TensorFlow 环境配置 CPU版本

问题: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.

猜你喜欢

转载自blog.csdn.net/ihiefoxboq/article/details/86560334