2016-12-29 140 views
0

今天我试着在W7 x64上安装Theano。我想我已经安装了它,但我也在某个地方犯了一个错误,我不知道在哪里。我真的想用它与CUDA。Theano Windows 7导入错误

这里是我安装的程序:通过Git的

这里 蟒蛇4.2.0 64(Python的2.7.12), TDM GCC, CUDA 8.0 的Visual Studio 13 Theano是theanorc文件:

[global] 
floatX = float32 
device = gpu 

[nvcc] 
compiler_bindir=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin 

[cuda] 
root = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0 

就像我说过的,我不知道我犯了什么错误。这里是输出当我写“import theano”

在此先感谢家伙!

In [2]: import theano 
--------------------------------------------------------------------------- 
ImportError        Traceback (most recent call last) 
<ipython-input-2-3397704bd624> in <module>() 
----> 1 import theano 

C:\Users\silverstone\Theano\theano\__init__.py in <module>() 
    64  object2, utils) 
    65 
---> 66 from theano.compile import (
    67  SymbolicInput, In, 
    68  SymbolicOutput, Out, 

C:\Users\silverstone\Theano\theano\compile\__init__.py in <module>() 
     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:\Users\silverstone\Theano\theano\compile\function_module.py in <module>() 
    16 
    17 import theano 
---> 18 from theano import config, gof 
    19 from theano.compat import izip 
    20 from theano.gof import graph 

ImportError: cannot import name gof 

PS:多了一个错误 - >http://pastebin.com/V59Pm9Qa

+0

可能的复制http://stackoverflow.com /问题/ 33850090 /编译 - 问题 - 当 - 磨合theano) – talonmies

回答

0

你有没有加入系统变量?如果没有,试试这个:

右键点击电脑 - >属性 - >高级系统设置 - >环境变量

添加一个新的系统变量

名称= THEANO_FLAGS

值= floatX = FLOAT32中,设备= GPU,nvcc.fastmath =真

另外补充Visual Studio的C++编译器的路径

添加; pathToYou rVSInstallation \ VC \ BIN \

如果无法正常工作,请去那里做一遍,从顶部: https://stackoverflow.com/a/41401271/7349628

[运行theano当编译问题(的