python3.7.2 tensorflow-gpu版本 找不到指定的模块。

本着用最新的开拓精神 加上刚好重装了电脑 所以python直接用到3.7.2的最新版本 

而且没用conda的 安装方法 直接IDLE..

之前跑过tensor-cpu版本的 可以跑通 keras也可以用 1.13版本刚刚支持python3.7

然后心血来潮想试试看gpu版本的

直接先装好 CUDA9.0 以及 CUDNN7.3(官网上写的要大于7.2 本来装的7.05 卸了重新上了个7.3)

安装了vs2015的环境

然后 还是报错

Traceback (most recent call last):
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\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 "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, 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\shelton\Desktop\tensorflow-gpu-test.py", line 1, in <module>
    import tensorflow
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\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 "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\shelton\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, 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.
 

emmm 目前还在解决中

更新 :

目前可能的原因是1.13的版本是基于cuda10的 我装的cuda9 可能是这个原因 明天试着更新一下cuda10

或者明天装回3.6.5

解决方案:

卸载cuda9.0 cudnn7.0

重新安装cuda10.0 cidn7.4.1for cuda10  

已经可以正常import tensorflow

猜你喜欢

转载自blog.csdn.net/u013318356/article/details/88146805
今日推荐