TensorFlow on Windows: ImportError: No module named '_pywrap_tensorflow_internal'

前端 未结 3 1265
没有蜡笔的小新
没有蜡笔的小新 2021-01-05 07:13

I am trying to make TensorFlow work on Windows. But after installation of Python 3.5 and TensorFlow, I keep getting the following error when I import the TensorFlow module:<

相关标签:
3条回答
  • 2021-01-05 07:45

    This error arises when one of the libraries (DLLs) on which TensorFlow depends cannot be found. To diagnose this kind of error, I have written a script that you can download from here; running the script will print suggestions about what steps to take to fix the error.

    • If you are running the CPU-only version of TensorFlow, the most likely DLL to be missing is MSVCP140.DLL. It is part of the Microsoft Visual C++ Redistributable Update 3, which you can download from here.

    • If you are running the GPU version of TensorFlow, it is possible that the CUDA libraries or the cuDNN libraries cannot be found. TensorFlow on Windows supports CUDA 8.0 (download from here) and cuDNN 5.1 (download from here). Note that cuDNN is often installed to a different directory from CUDA, and you may need to manually add it to your %PATH% environment variable.

    0 讨论(0)
  • 2021-01-05 07:52
    • just run below command it will clear all dependencies and then update it or remove and install the latest version of tensor flow(For CPU) This worked for me

    pip install tensorflow==1.5

    0 讨论(0)
  • 2021-01-05 08:00

    Thanks, your tool was awesome. Turns out my CUDA 8.0 install had a slightly older version of cudnn64_5.dll instead of cudnn64_6.dll.

    0 讨论(0)
提交回复
热议问题