Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling errors during import #2733

Closed
AlexNguyen124 opened this issue Apr 5, 2015 · 6 comments
Closed

compiling errors during import #2733

AlexNguyen124 opened this issue Apr 5, 2015 · 6 comments

Comments

@AlexNguyen124
Copy link

Hi I am getting errors when using the command Import theano.

I am on windows 7 64bi and I am using WinPython. My theano is bleeding edge

: 01080   
Problem occurred during compilation with the command line below:
C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\..\tools\mingw32\bin\g++.exe -shared -g -march=amdfam10 -mmmx -m3dnow -msse -msse2 -msse3 -mno-ssse3 -msse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=amdfam10 -D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -IC:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\lib\site-packages\numpy\core\include -IC:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\include -o C:\Users\LivRoom\AppData\Local\Theano\compiledir_Windows-7-6.1.7600-AMD64_Family_16_Model_2_Stepping_3_AuthenticAMD-2.7.9-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\LivRoom\AppData\Local\Theano\compiledir_Windows-7-6.1.7600-AMD64_Family_16_Model_2_Stepping_3_AuthenticAMD-2.7.9-64\lazylinker_ext\mod.cpp -LC:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\libs -LC:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64 -lpython27
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-2-3397704bd624> in <module>()
----> 1 import theano

C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\lib\site-packages\theano\theano\theano\__init__.pyc in <module>()
     53     object2, utils
     54 
---> 55 from theano.compile import      56     SymbolicInput, In,      57     SymbolicOutput, Out, 
C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\lib\site-packages\theano\theano\theano\compile\__init__.py in <module>()
      7         SpecifyShape, specify_shape, register_specify_shape_c_code)
      8 
----> 9 from theano.compile.function_module import *
     10 
     11 from theano.compile.mode import *

C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\lib\site-packages\theano\theano\theano\compile\function_module.py in <module>()
     15 from theano import gof
     16 from theano.compat.python2x import partial
---> 17 import theano.compile.mode
     18 from theano.compile.io import (
     19     In, SymbolicInput, SymbolicInputKit, SymbolicOutput)

C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\lib\site-packages\theano\theano\theano\compile\mode.py in <module>()
      9 import  theano
     10 from theano import gof
---> 11 import theano.gof.vm
     12 from theano.configparser import config, AddConfigVar, StrParam
     13 from theano.compile.ops import register_view_op_c_code, _output_guard

C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\lib\site-packages\theano\theano\theano\gof\vm.py in <module>()
    567 
    568 try:
--> 569     import lazylinker_c
    570 
    571     class CVM(lazylinker_c.CLazyLinker, VM):

C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\lib\site-packages\theano\theano\theano\gof\lazylinker_c.py in <module>()
    122             args = cmodule.GCC_compiler.compile_args()
    123             cmodule.GCC_compiler.compile_str(dirname, code, location=loc,
--> 124                                              preargs=args)
    125             # Save version into the __init__.py file.
    126             init_py = os.path.join(loc, '__init__.py')

C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\lib\site-packages\theano\theano\theano\gof\cmodule.pyc in compile_str(module_name, src_code, location, include_dirs, lib_dirs, libs, preargs, py_module)
   2007             # difficult to read.
   2008             raise Exception('Compilation failed (return status=%s): %s' %
-> 2009                             (status, compile_stderr.replace('\n', '. ')))
   2010         elif config.cmodule.compilation_warning and compile_stderr:
   2011             # Print errors just below the command line.

. collect2.exe: error: ld returned 1 exit statusir_Windows-7-6.1.7600-AMD64_Family_16_Model_2_Stepping_3_AuthenticAMD-2.7.9-64/lazylinker_ext/mod.cpp:1075: undefined reference to `__imp_PyModule_AddObject''ywords'ned references to `__imp__Py_NoneStruct' follow
@gsmafra
Copy link

gsmafra commented Apr 5, 2015

I am having the somewhat the same problem

#2732

Seems to be an issue with the C++ compiler

@abergeron
Copy link
Member

The problem happens because either it can't find the python2.7 import lib or it doesn't find the header. Without having access to the environment I can't really say more.

@nouiz
Copy link
Member

nouiz commented Apr 9, 2015

the other issue is not related.

Did you follow all the instruction at:

http://deeplearning.net/software/theano/install_windows.html#install-windows

On Tue, Apr 7, 2015 at 1:30 PM, abergeron notifications@github.com wrote:

The problem happens because either it can't find the python2.7 import lib
or it doesn't find the header. Without having access to the environment I
can't really say more.


Reply to this email directly or view it on GitHub
#2733 (comment).

@AlexNguyen124
Copy link
Author

Hi I have re-built the environment and now I have successfully completed the theano test for my cpu. A possible reason was that my Windows service pack was not up to date.
If you are interested to know. A few correction are needed on the page http://deeplearning.net/software/theano/install_windows.html#install-windows
1- link for the stdint header is not well written. Its missing the h of http.
2- For the Scientific Python distribution, Current version is now 2.7.9.4.
3- in the "Configuring the environnment": the script should be updated to reflect current version.
Thanks for your help.

@AlexNguyen124
Copy link
Author

Hi I have re-built the environment and now I have successfully completed the theano test for my cpu. A possible reason was that my Windows service pack was not up to date.
If you are interested to know. A few correction are needed on the page http://deeplearning.net/software/theano/install_windows.html#install-windows
1- link for the stdint header is not well written. Its missing the h of http.
2- For the Scientific Python distribution, Current version is now 2.7.9.4.
3- in the "Configuring the environnment": the script should be updated to reflect current version.
Thanks for your help.

@nouiz
Copy link
Member

nouiz commented Apr 9, 2015

Can you double check that this PR do it correctly?

#2749

In particular, the change from python-2.7.6.amd64 to python-2.7.9.amd64, is
that good?

thanks.

On Thu, Apr 9, 2015 at 3:27 PM, AlexNguyen124 notifications@github.com
wrote:

Hi I have re-built the environment and now I have successfully completed
the theano test for my cpu. A possible reason was that my Windows service
pack was not up to date.
If you are interested to know. A few correction are needed on the page
http://deeplearning.net/software/theano/install_windows.html#install-windows
1- link for the stdint header is not well written. Its missing the h of
http.
2- For the Scientific Python distribution, Current version is now 2.7.9.4.
3- in the "Configuring the environnment": the script should be updated to
reflect current version.
Thanks for your help.


Reply to this email directly or view it on GitHub
#2733 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants