Windows Theano Keras - lazylinker_ext \mod.cpp:没有这样的文件或目录 [英] Windows Theano Keras - lazylinker_ext\mod.cpp: No such file or directory

查看:307
本文介绍了Windows Theano Keras - lazylinker_ext \mod.cpp:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在安装Theano和Keras以下的,这对我以前的旧版本来说工作正常。现在,我已升级到最新的Theano版本,并在使用此命令验证其功能时:



Python:



<$ p从theano导入函数,配置,共享,沙箱




$ b

导致$ p> 在真正长的错误日志中包含:

  g ++。exe:错误:C:\ Users \ John:没有这样的文件或目录
g ++。exe:错误: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:没有这样的文件或目录

好像用户目录John Dow的路径被分割 by g ++到两个文件路径,因为名称中有空格。



有没有办法告诉python 不要使用C: \用户\约翰Dow目录,但例如C:\mytempdir。设置USERPROFILE窗口变量没有帮助。



注意:我设法修复了g ++命令,它失败了(通过向输出添加引号),它成功编译来源。不幸的是,它没有解决我的问题,因为当再次启动时,它在这一步失败。
这似乎也是Theano的问题,因为切换到不同的Python版本没有帮助。

从这里:
Theano:change `base_compiledir`将编译的文件保存到另一个目录中



即在〜/ .theanorc文件中(或者创建它)添加这一行:

  [global] 
base_compiledir = / some / path


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.

解决方案

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

这篇关于Windows Theano Keras - lazylinker_ext \mod.cpp:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆