[英]Installing Theano on EPD (Windows x64)
我正在尝试在Enthought Python Distribution(EPD)上安装Theano,但我得到了一个奇怪的错误。 这是我的安装的样子:
C:\\Python27
。 pip
使用easy_install pip
pip install Theano
为了测试,我启动ipython
并输入import theano
。 我收到以下错误:
Problem occurred during compilation with the command line below: g++ -shared -g -IC:\\Python27\\lib\\site-packages\\numpy\\core\\include -IC:\\Python27\\include -o C:\\Users\\Ove\\AppData\\Local\\Theano\\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_37_Stepping_5_GenuineIntel-2.7.2\\lazylinker_ext\\lazylinker_ext.pyd C:\\Users\\Ove\\AppData\\Local\\Theano\\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_37_Stepping_5_GenuineIntel-2.7.2\\lazylinker_ext\\mod.cpp -LC:\\Python27\\libs -LC:\\Python27 -lpython27 C:\\Users\\Ove\\AppData\\Local\\Temp\\ccIoNPlU.o: In function `initlazylinker_ext':C:/Users/Ove/AppData/Local/Theano/compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_37_Stepping_5_GenuineIntel-2.7.2/lazylinker_ext/mod.cpp:911: undefined reference to `__imp_Py_InitModule4' collect2: ld returned 1 exit status Exception: Compilation failed (return status=1): C:\\Users\\Ove\\AppData\\Local\\Temp. C:/Users/Ove/AppData/Local/Theano/compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_37_Stepping_5_GenuineIntel-2.7.2/lazylinker_ext/mod.cpp:911: undefi. collect2: ld returned 1 exit status4'
有谁知道如何让Theano与EPD合作?
Theano(0.5)的最后一个版本在Windows上存在一些问题。 您需要安装最新版本。 您可以像这样更新您的版本:
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
这应该可以解决问题。 如果没有,您可能与gcc的不同安装有一些冲突。 你用cygwin或mingw安装了吗? EPD安装了自己的mingw版本。
我无法让Theano与Enthought一起工作,但是使用Anaconda python发行版我最终得到了它。 这是如何做:
打开Windows命令提示符并键入
请安装theano
创建一个包含以下行的文件.theanorc.txt:
[global] openmp = False
[blas] ldflags =
将.theanorc.txt放在您的主文件夹中(您的用户帐户的文件夹)
确保将以下路径添加到PATH环境变量中:
C:\\蟒蛇\\ MinGW的\\ BIN; C:\\阿纳康达\\ MinGW的\\ x86_64的-W64-的mingw32 \\ lib中; C:\\阿纳康达; C:\\阿纳康达\\脚本;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.