G++.exe:error:and:no such file or directory
G++.exe:error:settings\administrator.theano\compiledir_windows-xp-5.1.2600-sp3-x86_family_6_model_15_stepping_ 13_genuineintel-2.7.12-32\lazylinker_ext\lazylinker_ext.pyd:no such file or directory
G++.exe:error:c:\documents:no such file or directory
G++.exe:error:and:no such file or directory
G++.exe:error:settings\administrator.theano\compiledir_windows-xp-5.1.2600-sp3-x86_family_6_model_15_stepping_ 13_genuineintel-2.7.12-32\lazylinker_ext\mod.cpp:no such file or directory
This error I refer to StackOverflow, Https://stackoverflow.com/questions/33702668/using-theano-on-windows-missing-lazylinker-ext-pyd
The discovery could be https://stackoverflow.com/questions/3848357/createprocess-no-such-file-or-directory.
Is the problem of CreateProcess, that is, calling system command error, Print_command_line_error ()
It is generally a path error because the subprocess often goes wrong.
The problem is, look for Lazylinker_ext.pyd, find the system does not have this file, then where is this file? In fact Theano in the first import Theano, the call g++ automatically compiled, in the compile time error, also can not see this file.
So why the mistake, where is wrong?
The problem is that the command line is wrong, there are several paths with spaces, Windows does not exist, such as C:\Document and Settings, with a space in the middle, it is not.
The solution is to put double quotes at both ends, and I didn't try the single quotes.
"C:\Document and Settings ..."
Carefully observe the wrong command line:
Problem occurred during compilation with the command line below: "C:\mingw\bin\g++.exe"-shared-g-march=core2-mcx1
6-msahf-mno-fma-mno-fma4-mno-xop-mno-bmi-mno-bmi2-mno-tbm-mno-hle-mno-rdrnd-mno-f16c-mno-fsgsbase-mno-rdseed -mno-prfchw-mno-adx-mfxsr-mno-xsave-mno-xsaveopt--param l1-cache-size=0--param l1-cache-line-size=0--param Che-size=1024-mtune=core2-dnpy_no_deprecated_api=npy_1_7_api_version-m32-i "C:\Python27\lib\site-packages\numpy \core\include "I" C:\Python27\include "I" C:\Python27\lib\site-packages\theano\gof "-L" C:\Python27\libs "-L" c:\ Python27 "-O C:\Documents and Settings\Administrator \.theano\compiledir_windows-xp-5.1.2600-sp3-x86_family_6_model _15_stepping_13_ genuineintel-2.7.12-32\lazylinker_ext\lazylinker_ext.pyd C:\Documents and Settings\Administrator \ . theano\compiledir_windows-xp-5.1.2600-sp3-x86_ Family_6_model_15_stepping_13_genuineintel-2.7.12-32\lazylinker _ext\mod.cpp-lpython27
-O after the PYD path with space, CPP source file with a space,
So the solution here is, turn to line No. 2281 of C:\Python27\Lib\site-packages\theano\gof\cmodule.py.
will be the original
Cmd.extend ([' O ', Lib_filename]) #这个是那个pyd的输出位置 with a space
cmd.append (cppfilename) #这个就是那个cpp源码
To
Cmd.extend ([' O ', '%s '% (lib_filename)])
cmd.append ('%s '% (cppfilename))
Then, go to cmd, execute
>python
>>> Import Theano
automatic compile Lazylinker_ext.pyd
CSDN markdown code block swap line missing characters. The!!!!!!!!!!!!!!!!!!!!!!!!!!! of Mara