Windows Theano Keras - lazylinker_ext\mod.cpp: No such file or directory
<p>I am installing Theano and Keras follwing the <a href="http://stackoverflow.com/questions/34097988/how-do-i-install-keras-and-theano-in-anaconda-python-2-7-on-windows?answertab=votes#tab-top">How do I install Keras and Theano in Anaconda Python 2.7 on Windows?</a>, 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:</p>

<p>Python:</p>

<pre><code> from theano import function, config, shared, sandbox
</code></pre>

<p>it resulted in really long error log containing:</p>

<pre><code>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
</code></pre>

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

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

<p>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.</p>

<p>Answer is from here:
<a href="http://stackoverflow.com/questions/34346839/theano-change-base-compiledir-to-save-compiled-files-in-another-directory">Theano: change `base_compiledir` to save compiled files in another directory</a></p>

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

<pre><code>[global]
base_compiledir=/some/path
</code></pre>

python g++ mingw theano keras