安装窗口10后无法导入theano

时间:2016-12-14 15:22:12

标签: python anaconda theano

在工作一周后,我仍然无法解决这个问题。 我想放弃并在一台虚拟机器上运行theano;对于Windows 10,似乎没有任何支持! 或者我错了;有一个简单的解决方案吗?

>>> import theano
Traceback (most recent call last):
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\gof\lazylinker_c.py", line 75, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\gof\lazylinker_c.py", line 92, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\gof\cmodule.py", line 1784, in _try_compile_tmp
    os.remove(exe_path + ".exe")
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\cturn\\AppData\\Local\\Temp\\try_march_3v6ffkv9.exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\__init__.py", line 66, in <module>
    from theano.compile import (
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\compile\__init__.py", line 10, in <module>
    from theano.compile.function_module import *
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\compile\function_module.py", line 21, in <module>
    import theano.compile.mode
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\compile\mode.py", line 10, in <module>
    import theano.gof.vm
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\gof\vm.py", line 659, in <module>
    from . import lazylinker_c
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\gof\lazylinker_c.py", line 125, in <module>
    args = cmodule.GCC_compiler.compile_args()
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\gof\cmodule.py", line 2088, in compile_args
    default_compilation_result, default_execution_result = try_march_flag(GCC_compiler.march_flags)
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\gof\cmodule.py", line 1856, in try_march_flag
    flags=cflags, try_run=True)
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\gof\cmodule.py", line 2188, in try_compile_tmp
    comp_args)
  File "C:\Users\cturn\Anaconda3\lib\site-packages\theano\theano\gof\cmodule.py", line 1789, in _try_compile_tmp
    err += "\n" + str(e)
TypeError: can't concat bytes to str
嗯,无法将字节连接到str?这是什么意思?

1 个答案:

答案 0 :(得分:1)

您遇到的错误似乎是由于另一个子流程使用与您尝试编写的脚本相同的资源。虽然听起来微不足道,但我建议您确保拥有管理员权限,或者至少拥有所需资源的权限,和/或重新启动计算机以使用该模块终止子进程。您还可以查看任务管理器并使用python终止任何/所有其他进程,但这可能需要更长时间。 (这可能是使用“资源”try_march_3v6ffkv9.exe)的程序