繁体   English   中英

在Windows上导入Tensorflow时出错

[英]Error when importing Tensorflow on Windows

我在尝试导入tensorflow时遇到这个错误:

Traceback (most recent call last):
  File "C:\Users\Luca\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\self_check.py", line 75, in preload_check
    ctypes.WinDLL(build_info.cudart_dll_name)
  File "C:\Users\Luca\AppData\Local\Programs\Python\Python36\lib\ctypes\ \__init__.py", line 348, in \__init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Impossibile trovare il modulo specificato

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import tensorflow as tf
  File "C:\Users\Luca\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "C:\Users\Luca\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Luca\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
    self_check.preload_check()
  File "C:\Users\Luca\AppData\Local\Programs\Python\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_80.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 8.0 from this URL: https://developer.nvidia.com/cuda-toolkit

我已经尝试过卸载protobuf和tensorflow并再次安装它,但是仍然出现此错误。

这些是我的规格:

作业系统:W10

GPU:英伟达GTX 1050 Ti

有人能帮我吗?

您是否尝试过从https://developer.nvidia.com/cuda-toolkit下载Cuda 8.0

ImportError: Could not find 'cudart64_80.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 8.0 from this URL: https://developer.nvidia.com/cuda-toolkit

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM