首先,我将尽力为您提供尽可能多的信息。我目前正在尝试在 windows 上为Python使用 tensorflow 模块。我知道该模块仅与 python 3.5 兼容,我已成功将其安装在D驱动器上的 virtualenv 中。现在这是问题所在,当我想在命令提示符下导入tensorflow时,它会说:
>>> import tensorflow
Traceback (most recent call last):
File "D:\Unknown\Documents\programs\python\tensorflow test\venv_python_3.5\lib\site-packages\tensorflow\python\platform\self_check.py", line 75, in preload_check
ctypes.WinDLL(build_info.cudart_dll_name)
File "C:\Users\Unknown\AppData\Local\Programs\Python\Python35\lib\ctypes\__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Can't find requested module
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\Unknown\Documents\programs\python\tensorflow test\venv_python_3.5\lib\site-packages\tensorflow\__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "D:\Unknown\Documents\programs\python\tensorflow test\venv_python_3.5\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "D:\Unknown\Documents\programs\python\tensorflow test\venv_python_3.5\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
self_check.preload_check()
File "D:\Unknown\Documents\programs\python\tensorflow test\venv_python_3.5\lib\site-packages\tensorflow\python\platform\self_check.py", line 82, in preload_check
% (build_info.cudart_dll_name, build_info.cuda_version_number))
ImportError: Could not find 'cudart64_90.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-90-download-archive
现在我已经在发生此错误之后安装了Cuda,我认为安装成功了,但是我仍然收到此错误,为什么有这个主意?