這本使用from sknn.mlp import *
錯誤再次出現在Enthought Canopy
:Theano包的Python(冠)的返回錯誤:無法導入名稱GOF
ImportError Traceback (most recent call last)
C:\Users\User_Account\Desktop\axxx.py in <module>()
----> 1 from sknn.mlp import *
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\sknn\mlp.py in <module>()
13
14 import numpy
---> 15 import theano
16 import sklearn.base
17 import sklearn.pipeline
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\__init__.py in <module>()
53 object2, utils)
54
---> 55 from theano.compile import (
56 SymbolicInput, In,
57 SymbolicOutput, Out,
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\compile\__init__.py in <module>()
7 SpecifyShape, specify_shape, register_specify_shape_c_code)
8
----> 9 from theano.compile.function_module import *
10
11 from theano.compile.mode import *
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\compile\function_module.py in <module>()
15
16 import theano
---> 17 from theano import gof
18 from theano.compat import partial
19 import theano.compile.mode
ImportError: cannot import name gof
In [3]: %run "C:/Users/Rahimikia/Desktop/axxx.py"
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
C:\Users\User_Account\Desktop\axxx.py in <module>()
----> 1 import theano
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\__init__.py in <module>()
53 object2, utils)
54
---> 55 from theano.compile import (
56 SymbolicInput, In,
57 SymbolicOutput, Out,
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\compile\__init__.py in <module>()
7 SpecifyShape, specify_shape, register_specify_shape_c_code)
8
----> 9 from theano.compile.function_module import *
10
11 from theano.compile.mode import *
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\compile\function_module.py in <module>()
15
16 import theano
---> 17 from theano import gof
18 from theano.compat import partial
19 import theano.compile.mode
ImportError: cannot import name gof
In [4]: %run "C:/Users/Rahimikia/Desktop/axxx.py"
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
C:\Users\User_Account\Desktop\axxx.py in <module>()
----> 1 import theano
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\__init__.py in <module>()
53 object2, utils)
54
---> 55 from theano.compile import (
56 SymbolicInput, In,
57 SymbolicOutput, Out,
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\compile\__init__.py in <module>()
7 SpecifyShape, specify_shape, register_specify_shape_c_code)
8
----> 9 from theano.compile.function_module import *
10
11 from theano.compile.mode import *
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\compile\function_module.py in <module>()
15
16 import theano
---> 17 from theano import gof
18 from theano.compat import partial
19 import theano.compile.mode
ImportError: cannot import name gof
In [5]: %run "C:/Users/Rahimikia/Desktop/axxx.py"
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
C:\Users\User_Account\Desktop\axxx.py in <module>()
----> 1 import theano
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\__init__.py in <module>()
53 object2, utils)
54
---> 55 from theano.compile import (
56 SymbolicInput, In,
57 SymbolicOutput, Out,
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\compile\__init__.py in <module>()
7 SpecifyShape, specify_shape, register_specify_shape_c_code)
8
----> 9 from theano.compile.function_module import *
10
11 from theano.compile.mode import *
C:\Users\User_Account\AppData\Local\Enthought\Canopy\User\lib\site-packages\theano\compile\function_module.py in <module>()
15
16 import theano
---> 17 from theano import gof
18 from theano.compat import partial
19 import theano.compile.mode
ImportError: cannot import name gof
我怎樣才能解決這個問題?我在Windows 8.1中使用軟件包管理器安裝了mingw
和libpython
,並安裝了Theano
開發人員版本,使用pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
。
哪個Python版本? – tamasgal
Canopy默認的python版本。我認爲它是'2.7.6'。 – user2991243
如果你'想',我們只能推測。 – tamasgal