python - pycuda._driver 导入错误(Windows)

标签 python numpy visual-studio-2013 cuda pycuda

我正在尝试在我的 Windows 7 计算机上运行 pycuda。我已经安装了以下内容-

<强>1。 Python 2.7.9

<强>2。 cuda_7.0.28_windows

<强>3。 numpy-1.9.2-win32-superpack-python2.7

<强>4。 pycuda-2014.1+cuda6514-cp27-none-win32(来自 christopher gohlke 的库页面的 whl)

<强>5。 Visual Studio 2013 社区版

以上所有安装均成功,但当我运行下面的代码时(代码很长,但导入语句应该足以描述问题)

from __future__ import division
import numpy as np
import pycuda.driver as drv
from pycuda.compiler import SourceModule

import pycuda.autoinit
import numpy.testing

我收到以下错误-

Traceback (most recent call last):
File "D:\trash\cuda_test.py", line 3, in <module>
    import pycuda.driver as drv
File "C:\Python27\lib\site-packages\pycuda\driver.py", line 2, in <module>
    from pycuda._driver import *  # noqa
ImportError: DLL load failed: The specified module could not be found.

知道问题出在哪里吗?

最佳答案

解决方案涉及安装库支持的 CUDA 版本。我有一个更高的版本。 pycuda库的文件名可以分解如下,以识别它支持的CUDAPython版本-

Filename: pycuda-2014.1+cuda6514-cp27-none-win32

Python version supported: 2.7 (from cp27)
CUDA version supported: 6.5.14 (from cuda6514)

关于python - pycuda._driver 导入错误(Windows),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30404269/

相关文章:

python - rc.local shell 脚本启动时缺少文件

python - 使用Dataframes style.apply基于比较值的突出显示

python - 使用 python 和 opencv 显示完整图像时出现白色边框

javascript - onbeforeunload 在 Visual Studio 2013 中不起作用

c++ - Visual Studio 2013 无法打开 'glfw3.lib'

python - urllib 与 elementtree 结合

Python错误 'NoneType'对象没有属性 '<....>'

python - Where 函数忽略 Nan

python - 当列更改 numpy.array 中的值时如何选择第一行

azure - 升级到 Azure 2.2 SDK 导致角色失败