qq_18846849
x66ccff
2017-01-14 15:56

import theano报错No such file or directory

5
  • python
  • mingw
  • theano

import theano 的时候出来一长串最后这样↓
改了path也没用
Exception: Compilation failed (return status=1): g++.exe: error: Files\Anaconda2\MinGW: No such file or directory

详细错误代码:
Problem occurred during compilation with the command line below:
"C:\Program Files\Anaconda2\Scripts\g++.bat" -shared -g -IC:\Program Files\Anaconda2\MinGW -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m32 -I"C:\Program Files\Anaconda2\lib\site-packages\numpy\core\include" -I"C:\Program Files\Anaconda2\include" -I"C:\Program Files\Anaconda2\lib\site-packages\theano\gof" -L"C:\Program Files\Anaconda2\libs" -L"C:\Program Files\Anaconda2" -o C:\Users\Administrator\AppData\Local\Theano\compiledir_Windows-7-6.1.7601-SP1-x86_Family_16_Model_6_Stepping_3_AuthenticAMD-2.7.12-32\lazylinker_ext\lazylinker_ext.pyd C:\Users\Administrator\AppData\Local\Theano\compiledir_Windows-7-6.1.7601-SP1-x86_Family_16_Model_6_Stepping_3_AuthenticAMD-2.7.12-32\lazylinker_ext\mod.cpp -lpython27

ExceptionTraceback (most recent call last)
in ()
----> 1 import theano

C:\Program Files\Anaconda2\lib\site-packages\theano__init__.pyc in ()
64 object2, utils)
65
---> 66 from theano.compile import (
67 SymbolicInput, In,
68 SymbolicOutput, Out,

C:\Program Files\Anaconda2\lib\site-packages\theano\compile__init__.py in ()
8 SpecifyShape, specify_shape, register_specify_shape_c_code)
9
---> 10 from theano.compile.function_module import *
11
12 from theano.compile.mode import *

C:\Program Files\Anaconda2\lib\site-packages\theano\compile\function_module.py in ()
19 from theano.compat import izip
20 from theano.gof import graph
---> 21 import theano.compile.mode
22 from theano.compile.io import (
23 In, SymbolicInput, SymbolicOutput)

C:\Program Files\Anaconda2\lib\site-packages\theano\compile\mode.py in ()
8 import theano
9 from theano import gof
---> 10 import theano.gof.vm
11 from theano.configparser import config
12 from theano.compile.ops import _output_guard

C:\Program Files\Anaconda2\lib\site-packages\theano\gof\vm.py in ()
657
658 try:
--> 659 from . import lazylinker_c
660
661 class CVM(lazylinker_c.CLazyLinker, VM):

C:\Program Files\Anaconda2\lib\site-packages\theano\gof\lazylinker_c.py in ()
125 args = cmodule.GCC_compiler.compile_args()
126 cmodule.GCC_compiler.compile_str(dirname, code, location=loc,
--> 127 preargs=args)
128 # Save version into the init.py file.
129 init_py = os.path.join(loc, '__init__.py')

C:\Program Files\Anaconda2\lib\site-packages\theano\gof\cmodule.pyc in compile_str(module_name, src_code, location, include_dirs, lib_dirs, libs, preargs, py_module, hide_symbols)
2307 # difficult to read.
2308 raise Exception('Compilation failed (return status=%s): %s' %
-> 2309 (status, compile_stderr.replace('\n', '. ')))
2310 elif config.cmodule.compilation_warning and compile_stderr:
2311 # Print errors just below the command line.

. ception: Compilation failed (return status=1): g++.exe: error: Files\Anaconda2\MinGW: No such file or directory

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐