No Module Named '_pywrap_tensorflow_internal'

No Module Named '_pywrap_tensorflow_internal'

参考:

https://stackoverflow.com/questions/44080677/no-module-named-pywrap-tensorflow-internal

http://blog.csdn.NET/bianjun1075/article/details/60478487

Check environment settings of CUDA, normally all the settings of CUDA had been added to Windows environment

Copy files inbin,libandincludeof cuDNN tobin,libandincludeof CUDA respectively. Normally the directory isC:\Program

Files\NVIDIA GPU Computing Toolkit\CUDA

注意二:在安装了CUDA Drivers后,还必须下载cuDNN,解压后将cudnn64_5.dll拷贝到能通过环境变量path找到的路径下。为避免混乱,我是拷贝到了NVIDIA GPUComputing Toolkit\CUDA\v8.0\bin目录下。否则你将会遇到上面这个问题:

注意cudnn64_7.dll是不行的,不知道为啥

import tensorflow as tf

Traceback (most recent call last):

File "D:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper

return importlib.import_module(mname)

File "D:\Program Files\Python35\lib\importlib\__init__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "", line 986, in _gcd_import

File "", line 969, in _find_and_load

File "", line 958, in _find_and_load_unlocked

File "", line 666, in _load_unlocked

File "", line 577, in module_from_spec

File "", line 906, in create_module

File "", line 222, in _call_with_frames_removed

ImportError: DLL load failed: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "D:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in

from tensorflow.python.pywrap_tensorflow_internal import *

File "D:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in

_pywrap_tensorflow_internal = swig_import_helper()

File "D:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper

return importlib.import_module('_pywrap_tensorflow_internal')

File "D:\Program Files\Python35\lib\importlib\__init__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

你可能感兴趣的:(No Module Named '_pywrap_tensorflow_internal')