問題:ImportError: DLL load failed: 找不到指定的模塊
Failed to load the native TensorFlow runtime.
版本 python3.6 +tensor1.12 +CPU版 是不可以的
事實上 py3.6--默認搭配GPU使用 py3.5--默認搭配CPU使用
這是很多博主沒有說明的問題
這是在anaconda中使用
conda install tensorflow
存在的現象。
搜索發現基本上python版本3.5可以解決而不知道準確原因,當重新裝完才明白!!!~
(目前官網不提供python安裝程序了 ,所以在這裏提供一個3.5.2的安裝包)
python 3.5.2 下載:
鏈接:https://pan.baidu.com/s/1uTQlq9ajabGpuYVaE24vQg 密碼:oj8e
(此步使用anaconda的朋友可以忽略,本人也是用anaconda重新配置了python的環境就好了,anaconda確實方便,不過安裝包確實官網不提供了!!!)
下圖py3.5
有沒有發現py35和 py36的不同 py36後面默認有個gpu版本,然鵝我的電腦沒錢配GPU,所以...
下圖py3.6
然後完美解決:(當然本人用anaconda重新配置了一個python3.5的環境,就沒有重裝anaconda來解決python版本問題。)
寫的可能有些亂,還請見諒
Traceback (most recent call last):
File "F:\anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "F:\anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "F:\anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "F:\anaconda\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "F:\anaconda\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: 找不到指定的模塊。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/34856/.PyCharmCE2018.1/config/scratches/scratch.py", line 7, in <module>
import tensorflow as tf
File "F:\anaconda\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "F:\anaconda\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "F:\anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "F:\anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "F:\anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "F:\anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "F:\anaconda\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "F:\anaconda\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: 找不到指定的模塊。
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.