无法导入Theano

时间:2018-05-29 08:05:05

标签: python python-3.x python-import theano

我已经从github克隆了theano并通过python setup.py install安装了它但是在尝试导入时我遇到了以下错误:
import theano.tensor as T

Problem occurred during compilation with the command line below:
"C:\MinGW\bin\g++.exe" -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include" -I"C:\ProgramData\Anaconda3\include" -I"D:\PyCharm\Theano\theano\gof\c_code" -L"C:\ProgramData\Anaconda3\libs" -L"C:\ProgramData\Anaconda3" -o "C:\Users\Администратор\AppData\Local\Theano\compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64\lazylinker_ext\lazylinker_ext.pyd" "C:\Users\Администратор\AppData\Local\Theano\compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64\lazylinker_ext\mod.cpp" -lpython36
Traceback (most recent call last):
  File "D:\PyCharm\Theano\theano\gof\lazylinker_c.py", line 81, in <module>
    actual_version, force_compile, _need_reload))
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\PyCharm\Theano\theano\gof\lazylinker_c.py", line 105, in <module>
    actual_version, force_compile, _need_reload))
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\PyCharm\Theano\theano\__init__.py", line 110, in <module>
    from theano.compile import (
  File "D:\PyCharm\Theano\theano\compile\__init__.py", line 12, in <module>
    from theano.compile.mode import *
  File "D:\PyCharm\Theano\theano\compile\mode.py", line 11, in <module>
    import theano.gof.vm
  File "D:\PyCharm\Theano\theano\gof\vm.py", line 674, in <module>
    from . import lazylinker_c
  File "D:\PyCharm\Theano\theano\gof\lazylinker_c.py", line 140, in <module>
    preargs=args)
  File "D:\PyCharm\Theano\theano\gof\cmodule.py", line 2344, in compile_str
    compile_stderr = decode(p_out[1])
  File "D:\PyCharm\Theano\theano\compat\__init__.py", line 43, in decode
    return x.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 9: invalid start byte

我该如何处理这个问题?

0 个答案:

没有答案