Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
654 views
in Technique[技术] by (71.8m points)

python - Installing Theano on EPD (Windows x64)

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:

  • I have installed EPD to C:Python27.
  • After that, I have installed pip by using easy_install pip
  • I installed Theano by using pip install Theano
  • To test, I start ipython and type import theano. I get the following error:

    Problem occurred during compilation with the command line below:
    g++ -shared -g -IC:Python27libsite-packages
    umpycoreinclude -IC:Python27include -o C:UsersOveAppDataLocalTheanocompiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_37_Stepping_5_GenuineIntel-2.7.2lazylinker_extlazylinker_ext.pyd C:UsersOveAppDataLocalTheanocompiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_37_Stepping_5_GenuineIntel-2.7.2lazylinker_extmod.cpp -LC:Python27libs -LC:Python27 -lpython27
    C:UsersOveAppDataLocalTempccIoNPlU.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:UsersOveAppDataLocalTemp. 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'
    

Does anyone know how to get Theano to run with EPD?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...