我无法导入Tensorflow。 我的GPU nvidia 940mx和我正在使用python 3.6。
我安装的软件包是:
absl-py(0.2.0)
阿斯特(0.6.2)
漂白剂(1.5.0)
循环器(0.10.0)
气(0.2.0)
grpcio(1.11.0)
html5lib(0.9999999)
猕猴桃(1.0.1)
降价(2.6.11)
matplotlib(2.2.2)
numpy的(1.14.2)
opencv-python(3.4.0.12)
点(9.0.3)
protobuf(3.5.2.post1)
pyparsing(2.2.0)
python-dateutil(2.7.2)
pytz(2018.4)
setuptools(39.0.1)
六(1.11.0)
张量板(1.7.0)
tensorflow-gpu(1.7.0)
termcolor(1.1.0)
Werkzeug(0.14.1)
轮(0.31.0)
错误是:
import tensorflow as tf
Traceback (most recent call last):
File"C:\Program Files\Python36\lib\site-packages\tensorflow\python\platform\self_check.py", line 75, in preload_check
ctypes.WinDLL(build_info.cudart_dll_name)
File"C:\Program Files\Python36\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File"", line 1, in
File"C:\Program Files\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in
from tensorflow.python import * # pylint: disable=redefined-builtin
File"C:\Program Files\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File"C:\Program Files\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in
self_check.preload_check()
File"C:\Program Files\Python36\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-toolkit`enter code here`
您安装的Tensorflow版本需要CUDA 9.0。 您应该检查是否已安装(而不是其他版本)。
如果您想使用例如 CUDA 9.1,您需要自己编译Tensorflow(此处为教程)。
非常感谢,并解决了问题..我安装了程序。
如果您认为这是您的问题的答案,请标记为已回答。