我尝试导入theano
,但我收到导入错误。
我发现theano
的常见问题与未安装g++
,mingw
或libpython
有关。我可以确认我已安装了所有三个。 g++ 4.7.0
,mingw 4.7
,libpython 2.1
和theano 1.0.1
。
关于下一步要追究什么的任何建议?我有点难过。
当我运行一个简单的python(3.6)文件试图导入theano时,我得到以下内容:
You can find the C code in this temporary file: C:\Users\CAVEJO~1\AppData\Local\Temp\theano_compilation_error_1b3hfusl
Traceback (most recent call last):
File "C:\Users\Cave Johnson\AppData\Local\Programs\Python\Python36-32\lib\site-packages\theano\gof\lazylinker_c.py", line 75, in <module>
raise ImportError()
ImportError
在处理上述异常期间,发生了另一个异常:
Traceback (most recent call last):
File "C:\Users\Cave Johnson\AppData\Local\Programs\Python\Python36-32\lib\site-packages\theano\gof\lazylinker_c.py", line 92, in <module>
raise ImportError()
ImportError
在处理上述异常期间,发生了另一个异常:
Traceback (most recent call last):
File "C:\Users\Cave Johnson\AppData\Local\Programs\Python\Python36-32\Projects\Pandas\housing_prices.py", line 4, in <module>
import theano
File "C:\Users\Cave Johnson\AppData\Local\Programs\Python\Python36-32\lib\site-packages\theano\__init__.py", line 110, in <module>
from theano.compile import (
File "C:\Users\Cave Johnson\AppData\Local\Programs\Python\Python36-32\lib\site-packages\theano\compile\__init__.py", line 12, in <module>
from theano.compile.mode import *
File "C:\Users\Cave Johnson\AppData\Local\Programs\Python\Python36-32\lib\site-packages\theano\compile\mode.py", line 11, in <module>
import theano.gof.vm
File "C:\Users\Cave Johnson\AppData\Local\Programs\Python\Python36-32\lib\site-packages\theano\gof\vm.py", line 673, in <module>
from . import lazylinker_c
File "C:\Users\Cave Johnson\AppData\Local\Programs\Python\Python36-32\lib\site-packages\theano\gof\lazylinker_c.py", line 127, in <module>
preargs=args)
File "C:\Users\Cave Johnson\AppData\Local\Programs\Python\Python36-32\lib\site-packages\theano\gof\cmodule.py", line 2359, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): The system cannot find the path specified.
。
答案 0 :(得分:1)
我遇到了同样的问题,它归结为缺少依赖关系。
这似乎是我的关键:
conda install numpy scipy mkl-service libpython m2w64-toolchain
conda install -c conda-forge blas