首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >python优化失败原因是: local_dot_to_dot22

python优化失败原因是: local_dot_to_dot22
EN

Stack Overflow用户
提问于 2015-09-08 15:45:17
回答 2查看 555关注 0票数 2

我只是安装了theano并尝试运行theano.test()。它产生了一个很长的错误日志,我复制了第一部分。我还尝试了另外几个例子--我见过

代码语言:javascript
复制
"local_dot_to_dot22" 

代码语言:javascript
复制
 "ValueError: invalid token "Files\Enthought\Canopy\App\appdata\canopy1.5.2.2785.win-x86_64\Scripts" in ldflags_str: "-LC:\Program Files\Enthought\Canopy\App\appdata\canopy-1.5.2.2785.win-x86_64\Scripts -lmk2_core -lmk2_intel_thread -lmk2_rt" 

好几次了。

我用的是python 2.7 (冠层),scipy 0.15.1-2和numpy 1.9.2-1。我对西亚诺很陌生。如果你能给我指明正确的方向,我很感激。谢谢!

代码语言:javascript
复制
EEEEEERROR (theano.gof.opt): Optimization failure due to: local_dot_to_dot22
ERROR:theano.gof.opt:Optimization failure due to: local_dot_to_dot22
ERROR (theano.gof.opt): TRACEBACK:
ERROR:theano.gof.opt:TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "c:\theano\theano\gof\opt.py", line 1737, in process_node
replacements = lopt.transform(node)
File "c:\theano\theano\tensor\blas.py", line 1776, in local_dot_to_dot22
return [_dot22(x.dimshuffle('x', 0), y).dimshuffle(1)]
File "c:\theano\theano\gof\op.py", line 647, in __call__
no_recycling=[])
File "c:\theano\theano\gof\op.py", line 918, in make_thunk
no_recycling)
File "c:\theano\theano\gof\op.py", line 836, in make_c_thunk
output_storage=node_output_storage)
File "c:\theano\theano\gof\cc.py", line 1175, in make_thunk
keep_lock=keep_lock)
File "c:\theano\theano\gof\cc.py", line 1113, in __compile__
keep_lock=keep_lock)
File "c:\theano\theano\gof\cc.py", line 1541, in cthunk_factory
key = self.cmodule_key()
File "c:\theano\theano\gof\cc.py", line 1257, in cmodule_key
compile_args=self.compile_args(),
File "c:\theano\theano\gof\cc.py", line 936, in compile_args
ret += x.c_compile_args()
File "c:\theano\theano\tensor\blas.py", line 652, in c_compile_args
return ldflags(libs=False, flags=True)
File "c:\theano\theano\tensor\blas.py", line 537, in ldflags
include_dir=include_dir)
File "c:\theano\theano\gof\utils.py", line 182, in rval
val = f(*args, **kwargs)
File "c:\theano\theano\tensor\blas.py", line 597, in _ldflags
% (t, ldflags_str))
ValueError: invalid token "Files\Enthought\Canopy\App\appdata\canopy-    1.5.2.2785.win-x86_64\Scripts" in ldflags_str: "-LC:\Program Files\Enthought\Canopy\App\appdata\canopy-1.5.2.2785.win-x86_64\Scripts -lmk2_core -lmk2_intel_thread -lmk2_rt"
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-09-08 16:33:39

这里的问题是在您的路径中有空间所造成的问题,即C:\Program Files\Enthought\Canopy中安装了Canopy,但是Theano脚本不能很好地处理ProgramFiles之间的空间。请尝试卸载Canopy并在路径中没有空格的目录中重新安装。

您还应该遵循在Windows上安装Theano的其他说明。不幸的是,它并不像pip install theano那么简单。

票数 3
EN

Stack Overflow用户

发布于 2017-04-04 06:30:28

如果您不想重新安装东西,例如,如果它们是繁重的程序,会影响窗口的注册表,所以您可以尝试使用符号链接

符号链接将创建类似于文件夹的快捷方式,但其他应用程序则将其视为实际文件夹。

所以,你可以这样做:

  • 以管理员身份运行cmd
  • 用户此命令:mklink /D "C:\LinkToProgramFiles" "C:\Program Files"

然后,您将开始在ldflags中使用"C:\LinkToProgramFiles“。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32462036

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档