【发布时间】:2016-05-12 00:38:42
【问题描述】:
我正在使用带有 NVidia 显卡的 Windows 7 64 位笔记本电脑。我想使用使用 Theano 的千层面。我从没想过会这么复杂:/
在我自己惨遭失败后,我尝试按照本教程进行操作:http://deeplearning.net/software/theano/install_windows.html - 它使用 python2.7,但我想使用较新的 3.5 版本(我认为这不是问题)。我做了一切,最后我可以打电话了:
>where gcc
C:\TDM-GCC-64\bin\gcc.exe
>where gendef
C:\TDM-GCC-64\x86_64-w64-mingw32\bin\gendef.exe
>where cl
C:\Users\user\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\bin\amd64\cl.exe
>where nvcc
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe
>where python
C:\WinPython-64bit-3.5.1.1\python-3.5.1.amd64\python.exe
C:\Users\user\AppData\Local\Programs\Python\Python35-32\python.exe
我认为这看起来很有希望,我什至检查了 python.exe 是 64 位版本(我从其他线程进行了 size() 检查)。所以接下来我下载了 Theano,我应该调用“python setup.py develop”,但它说“unknown option develop”,所以我使用了“build”和“install”。然后我尝试运行一个示例,但是当我输入“import theano”时,我收到以下错误:
>>> import theano
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
[...]
from theano.gof.cmodule import GCC_compiler
File "C:\Users\user\Downloads\Theano-master\Theano-master\theano\gof\cmodule.py", line 34, in <module>
from theano.gof import compilelock
File "C:\Users\user\Downloads\Theano-master\Theano-master\theano\gof\compilelock.py", line 6, in <module>
import socket # only used for gethostname()
File "C:\Users\user\AppData\Local\Programs\Python\Python35-32\Lib\socket.py", line 49, in <module>
import _socket
ImportError: DLL load failed: %1 is not a valid Win32 application.
所以这似乎是一个 64 位 - 32 位 DLL 问题。你们有什么建议吗?非常感谢!
【问题讨论】:
-
回溯中的路径表明它使用的是 32 位而不是 64 位。
-
哦 35-32 对吗?我想我可以解决这个问题。将在一分钟内报告
标签: python windows dll 32bit-64bit theano