Windows Theano Keras - lazylinker_ext\mod.cpp: No such file or directory

こ雲淡風輕ζ 提交于 2019-12-12 03:15:03

问题


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:


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


来源:https://stackoverflow.com/questions/39595392/windows-theano-keras-lazylinker-ext-mod-cpp-no-such-file-or-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!