2015-06-29 30 views
8

我试图在CPU机器上安装Theano(运行英特尔高清显卡,没有NVIDIA)。我在python中测试时遇到以下导入错误。Theano导入错误

WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to exe 
cute optimized C-implementations (for both CPU and GPU) and will default to Pyth 
on implementations. Performance will be severely degraded. To remove this warnin 
g, set Theano flags cxx to an empty string. 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "c:\anaconda\pkgs\theano\theano\__init__.py", line 74, in <module> 
    from theano.printing import pprint, pp 
    File "c:\anaconda\pkgs\theano\theano\printing.py", line 19, in <module> 
    if pd.find_graphviz(): 
    File "C:\Anaconda\lib\site-packages\pydot.py", line 409, in find_graphviz 
    "SOFTWARE\ATT\Graphviz", 0, win32con.KEY_QUERY_VALUE) 
pywintypes.error: (2, 'RegOpenKeyEx', 'The system cannot find the file specified 
.') 

虽然我已经安装了g ++。

谢谢。

回答

18

As described in the documentation,请确保您在使用Anaconda时完成了此操作。

conda install mingw libpython 
+0

由于这真是帮了我的干净安装克++ –

1

如果使用Pycharm在Windows上,遵循以下步骤:

  • 安装蟒蛇
  • 改变你的解释,以水蟒蟒
  • 安装theano
  • 安装MinGW的
  • 安装libpython
0

试试这个:

pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git 

十个,

from theano import * 

这是为我工作