无法在Windows 7上安装Tensorflow 1.12,Python 3.6.2

时间:2019-01-20 13:55:07

标签: python-3.x tensorflow keras windows-7

在Windows 7上,我想将Keras与Python一起使用来构建神经网络,但在使用Tensorflow安装Keras时遇到以下错误(请参见错误的python日志):

  

ImportError:DLL加载失败,错误代码为-1073741795

由于软件组件的各种依赖性,这似乎非常困难。一些帖子建议将CNTK与Keras一起使用,但我想学习Tensorflow。

如果可能的话,任何想法都会受到高度赞赏。

我的配置(我已经使用“ pip”安装了软件包):

  • Window 7
  • Python 3.6.3
  • 点18.1
  • Keras 2.2.4
  • Tensorflow 1.12.0
  • Tensorflow-gpu 1.10.0(某些论坛上建议降级)
  • CUDA 9.0
  • cudnn64_7.dll
  • Microsoft Visual C ++ 2015可再发行(x64) 14.0.23026(+ 2005,2008,2010,2012,2013)

请注意,CUDA v9.0安装程序报告了一些与Visual Studio相关的问题:


  已安装:
    -Nsight Monitor和HUD Launcher

未安装:
Nsight for Visual Studio 2017原因:未找到VS2017
Nsight for Visual Studio 2015原因:未找到VS2015
Nsight for Visual Studio 2013原因:未找到VS2013
Nsight for Visual Studio 2012原因:未找到VS2012
Nsight for Visual Studio 2010原因:未找到VS2010


最后,这是尝试使用Keras时python的输出:

Using TensorFlow backend.
Traceback (most recent call last):
  File "D:\install\python363\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in 
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "D:\install\python363\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in 
    _pywrap_tensorflow_internal = swig_import_helper()
  File "D:\install\python363\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
    return importlib.import_module(mname)
  File "D:\install\python363\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed with error code -1073741795

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "keras1.py", line 2, in 
    from keras.models import Sequential
  File "D:\install\python363\lib\site-packages\keras\__init__.py", line 3, in 
    from . import utils
  File "D:\install\python363\lib\site-packages\keras\utils\__init__.py", line 6, in 
    from . import conv_utils
  File "D:\install\python363\lib\site-packages\keras\utils\conv_utils.py", line 9, in 
    from .. import backend as K
  File "D:\install\python363\lib\site-packages\keras\backend\__init__.py", line 89, in 
    from .tensorflow_backend import *
  File "D:\install\python363\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in 
    import tensorflow as tf
  File "D:\install\python363\lib\site-packages\tensorflow\__init__.py", line 22, in 
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "D:\install\python363\lib\site-packages\tensorflow\python\__init__.py", line 49, in 
    from tensorflow.python import pywrap_tensorflow
  File "D:\install\python363\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in 
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "D:\install\python363\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in 
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "D:\install\python363\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in 
    _pywrap_tensorflow_internal = swig_import_helper()
  File "D:\install\python363\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper
    return importlib.import_module(mname)
  File "D:\install\python363\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed with error code -1073741795


Failed to load the native TensorFlow runtime.

0 个答案:

没有答案