简体   繁体   中英

Error when importing Tensorflow on Windows

I get this erro trying to importing 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

I've alredy tried to uninstall protobuf and tensorflow and install it again, but still get this error.

Those are my specs:

OS : W10

GPU : Nvidia GTX 1050 Ti

Can someone help me?

您是否尝试过从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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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