在 EPD 上安装 Theano (Windows x64) [英] Installing Theano on EPD (Windows x64)
问题描述
我正在尝试在 Enthought Python Distribution (EPD) 上安装 Theano,但我收到一个奇怪的错误.这是我的安装方式:
I'm trying to install Theano on Enthought Python Distribution (EPD), but I am getting a weird error. Here is what my installation looks like:
- 我已将 EPD 安装到
C:\Python27
. - 之后,我使用
easy_install pip
安装了 - 我使用
pip install Theano
安装了 Theano 为了测试,我启动
ipython
并输入import theano
.我收到以下错误:
pip
- I have installed EPD to
C:\Python27
. - After that, I have installed
pip
by usingeasy_install pip
- I installed Theano by using
pip install Theano
To test, I start
ipython
and typeimport theano
. I get the following error:
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 一起运行?
Does anyone know how to get Theano to run with EPD?
推荐答案
Theano(0.5) 的最新版本在 Windows 上存在一些问题.您需要安装最新版本.您可以像这样更新您的版本:
The last release of Theano(0.5) has some problem on Windows. You need to install the bleeding edge version. You can update your version like this:
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
这应该可以解决问题.如果没有,您可能与不同的 gcc 安装存在冲突.你是用 cygwin 还是 mingw 安装的?EPD 安装自己的 mingw 版本.
This should solve the problem. If not, you probably have some conflict with a different installation of gcc. Do you have installed it with cygwin or mingw? EPD installs its own version of mingw.
这篇关于在 EPD 上安装 Theano (Windows x64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!