如何在Windows上安装tensorflow-gpu V2而不从源代码重新编译

时间:2019-05-03 11:52:08

标签: windows tensorflow

如何在Windows上安装tensorflow-gpu V2而无需重新编译?

我有一个NVIDIA RTX 2080 TI,所以我至少需要使用NVIDIA 10。

我已安装:

  • NVDIA 10.1,在路径中设置
  • CUDNN(文件cudnn64_7.dll),在路径中设置
  • visualStudioLibCpp可重新分发的版本2017(文件vcredist_x64.exe和vc_redist.x64.exe),并在路径中进行了设置。注意:我也尝试了2015和2019版本。
  • python 3.7.3
  • pip install tensorflow-gpu == 2.0.0-alpha0

当我尝试导入时,出现此错误:

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_ten
 line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_ten
rnal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_ten
rnal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: Le module spécifié est introuvable.

在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", lin
dule>
    from tensorflow._api.v2 import audio
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\_api\v2\audio\__i
ine 8, in <module>
    from tensorflow.python.ops.gen_audio_ops import decode_wav
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\__init__.p
 in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_ten
 line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_ten
 line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_ten
rnal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_ten
rnal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\gilfr\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: Le module spécifié est introuvable.

我的问题是我的安装有什么问题吗?

0 个答案:

没有答案