Windows Theano Keras - lazylinker_ext\mod.cpp: No

2019-09-05 16:07发布

I am installing Theano and Keras follwing the How do I install Keras and Theano in Anaconda Python on Windows?, which worked fine for me with an older release before. Now I have upgraded to the latest Theano version and when validating its functionality using this command:

Python:

 from theano import function, config, shared, sandbox

it resulted in really long error log containing:

g++.exe: error: C:\Users\John: No such file or directory
g++.exe: error: Dow\AppData\Local\Theano\compiledir_Windows-10-10.0.10240-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.12-64\lazylinker_ext\mod.cpp: No such file or directory

It seems the path to user directory "John Dow" was splitted by g++ to two file paths, since there is space in the name.

Is there any way how to tell python to not to use the "C:\Users\John Dow" directory but e.g. "C:\mytempdir". Setting the USERPROFILE windows variable didn't help.

NOTE: I managed to fix the g++ command, where it failed (by adding quotes to the output), which successfully compiled the sources. Unfortunately it didnt solve my problem, since when started again, it fails on this step. It seems also to be an issue of Theano, since swithcing to different Python version didnt help.

1条回答
来,给爷笑一个
2楼-- · 2019-09-05 16:14

Answer is from here: Theano: change `base_compiledir` to save compiled files in another directory

i.e. in ~/.theanorc file (or create it) add this line :

[global]
base_compiledir=/some/path
查看更多
登录 后发表回答