win10 import tensorflow报错" No module named "_pywrap_tensorflow""

问题:win10import tensorflow报错"   No module named "_pywrap_tensorflow"

·        No module named "_pywrap_tensorflow"

·        DLL load failed.

问题解决

The problem was the cuDNN Library for me -for whatever reason cudnn-8.0-windows10-x64-v6.0 was NOT working - I usedcudnn-8.0-windows10-x64-v5.1 - ALL GOOD!

My setup working with Win10 64 and theNvidia GTX780M:

·        Be sure you have the lib MSVCP140.DLL by checking yoursystem/path - if not get it here

·        Run the windows installer for python 3.5.3-amd64from here - DO NOT trynewer versions as they probably won't work

·        Get the cuDNN v5.1 for CUDA 8.0 from here - put it under your users folder orin another known location (you will need this in your path)

·        Get CUDA 8.0 x86_64 from here

·        Set PATH vars as expected to point at the cuDNN libs andpython (the python path should be added during the python install)

·        Make sure that ".DLL" is included in yourPATHEXT variable

·        If you are using tensorflow 1.3 then you want to usecudnn64_6.dll github.com/tensorflow/tensorflow/issues/7705

If you runWindows 32 be sure to get the 32 bit versions of the files mentioned above.

总结:

老版本有问题,新版本有问题,要找合适的版本,也就是别人和你都ok的版本.

参考:

https://stackoverflow.com/questions/43370953/error-while-import-tensorflow-module

https://www.tensorflow.org/install/install_windows


猜你喜欢

转载自blog.csdn.net/xyh421/article/details/79148667