【问题标题】:Installing Theano with Canopy EPD on windows 7, 64 bit在 Windows 7、64 位上使用 Canopy EPD 安装 Theano
【发布时间】:2015-08-16 18:54:53
【问题描述】:

我已在 Canopy EPD、windows 7、64 位上成功安装了 theano。在导入 theano (第一次测试)时,我收到了这个错误。任何人都可以帮忙。谢谢。

类似于这个问题: Installing Theano on EPD (Windows x64)

Exception: Compilation failed (return status=1): C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o: In function unpack_list_of_ssize_t':. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:58: undefined reference to__imp_PyExc_TypeError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:68: undefined reference to __imp_PyExc_IndexError'. C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o: In functionCLazyLinker_init':. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:341: undefined reference to __imp_PyCObject_Type'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:362: undefined reference to__imp_PyExc_IndexError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:380: undefined reference to __imp_PyExc_IndexError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:395: undefined reference to__imp_PyExc_IndexError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:399: undefined reference to __imp_PyExc_IndexError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:403: undefined reference to__imp_PyExc_IndexError'. C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o:C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:407: more undefined references to __imp_PyExc_IndexError' follow. C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o: In functionCLazyLinker_init':. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:415: undefined reference to __imp_PyExc_TypeError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:430: undefined reference to__imp__Py_NoneStruct'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:436: undefined reference to __imp_PyExc_IndexError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:450: undefined reference to__imp_PyExc_TypeError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:454: undefined reference to __imp__Py_NoneStruct'. C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o: In functionc_call':. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:555: undefined reference to __imp__Py_NoneStruct'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:555: undefined reference to__imp__Py_NoneStruct'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:555: undefined reference to __imp__Py_NoneStruct'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:556: undefined reference to__imp__Py_NoneStruct'. C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o:C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:556: more undefined references to __imp__Py_NoneStruct' follow. C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o: In functionlazy_rec_eval':. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:628: undefined reference to __imp_PyExc_IndexError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:651: undefined reference to__imp_PyExc_TypeError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:659: undefined reference to __imp_PyExc_ValueError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:667: undefined reference to__imp_PyExc_IndexError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:718: undefined reference to __imp__Py_NoneStruct'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:725: undefined reference to__imp_PyExc_TypeError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:731: undefined reference to __imp_PyExc_TypeError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:781: undefined reference to__imp__Py_NoneStruct'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:781: undefined reference to __imp__Py_NoneStruct'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:782: undefined reference to__imp__Py_NoneStruct'. C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o: In function CLazyLinker_call':. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:817: undefined reference to__imp__Py_NoneStruct'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:817: undefined reference to __imp__Py_NoneStruct'. C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o:C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:818: more undefined references to__imp__Py_NoneStruct' follow. C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o: In function CLazyLinker_call':. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:867: undefined reference to__imp_PyExc_AssertionError'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:910: undefined reference to __imp__Py_NoneStruct'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:910: undefined reference to__imp__Py_NoneStruct'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:911: undefined reference to __imp__Py_NoneStruct'. C:\Users\HARISH~1\AppData\Local\Temp\ccLHOaX7.o: In functionCLazyLinker_set_allow_gc':. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:943: undefined reference to __imp_PyBool_Type'. C:/Users/Harish-Chandra/AppData/Local/Theano/compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.9-64/lazylinker_ext/mod.cpp:946: undefined reference to__imp__Py_TrueStruct'. collect2: ld returned 1 exit status.

【问题讨论】:

  • 我认为问题出在您的 C++ 编译器上。您提到您的问题与引用的问题相似,但没有解释为什么其他问题的答案不能回答您的问题。请详细说明!

标签: python windows theano canopy


【解决方案1】:

由于作者没有正确关闭这个问题,并且它也与大多数 EPD 用户相关,包括我第一次开始使用 EPD + theano 时,我会回答它。

首先,如果可能,删除任何其他 python 环境。 确保没有其他python的环境路径冲突,以防万一。

1.安装EPD CANOPY

2.安装 Canopy 应用程序上可用的软件包安装程序中的 MinGW 软件包

这应该很容易做到,您只需从 Canopy 应用程序内部打开包管理器即可。

3.从 EPD 内部安装 Theano

你去垃圾邮件之前

pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git

在您看到的每个命令提示符中,不要这样做

-- 改为打开 Canopy。

在 Canopy 屏幕中,转到“工具”,然后打开“Canopy 命令提示符”

将打开一个与 windows 中的 CMD 完全相同的屏幕。

在该屏幕上,执行

pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git

现在应该可以正常工作了。

--

但是,不要忘记您将需要,显然是 Windows SDK,当然取决于 Windows 版本。 你可以尝试安装最后一个 Visual Studio 附带你需要的一切。

如果您需要这方面的更多信息,请查看相关的 Stackoverflow 主题:

Installing theano

【讨论】:

    猜你喜欢
    • 2012-05-03
    • 1970-01-01
    • 1970-01-01
    • 2011-01-26
    • 2014-04-19
    • 2013-08-10
    • 2012-09-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多