2016-12-29 101 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當編譯問題(的