简体   繁体   English

Tensorflow-GPU安装ImportError:DLL加载失败:找不到指定的模块

[英]Tensorflow-GPU Installation ImportError: DLL load failed: The specified module could not be found

Ok i know this might be already answered question but i have tried almost every trick suggested on stackoverflow to install tensorflow-gpu and suggested on official docs but with no luck i am getting the same error. 好的,我知道这可能已经回答了问题,但是我已经尝试了在stackoverflow上建议的几乎所有技巧来安装tensorflow-gpu并在官方文档中建议了但没有运气我遇到了同样的错误。 Firstly i have tried this then afterwards offical docs then stackoverflow tricks but still getting error I have installed 首先,我尝试过这个,然后是官方文档,然后是stackoverflow技巧,但仍然安装了我得到的错误

  1. Anaconda 3.5 which was with python 3.7 but then i downgraded it to 3.6.6 Anaconda 3.5与python 3.7一起使用,但后来我将其降级为3.6.6
  2. Then created virtual env named tensorflow with python 3.6.6 然后用python 3.6.6创建一个名为tensorflow的虚拟环境
  3. Then in tensorflow env pip install tensorflow-gpu 然后在tensorflow env pip中安装tensorflow-gpu
  4. It was installed successfully then i installed CUDA 9.0 它已成功安装,然后我安装了CUDA 9.0
  5. Then cuDNN 7.3 for CUDA 9.0(I have also tried CUDA 8.0 with cuDNN 6.1) 然后是CUD 9.0的cuDNN 7.3(我也尝试过cuDNN 6.1的CUDA 8.0)
  6. Copied all DLL cuDNN bin/lib to CUDA 9.0 bin/lib 将所有DLL cuDNN bin / lib复制到CUDA 9.0 bin / lib
  7. Specified CUDA system environment variable path upto bin 指定的CUDA系统环境变量路径可达bin

    SAME QUESTION IS ASKED HERE BUT HAS NO ANSWER I HAVE THE SAME TRACE. 这里提出了相同的问题,但我没有相同的答案。

    Python 3.6.6 |Anaconda, Inc.| Python 3.6.6 | Anaconda,Inc. | (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. (默认值,2018年6月28日,11:27:44)Win32上的[MSC v.1900 64位(AMD64)]键入“帮助”,“版权”,“信用”或“许可证”以获取更多信息。

    import tensorflow Traceback (most recent call last): File "D:\\conda\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "D:\\conda\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py", line 29, in _pywrap_tensorflow_internal = swig_import_helper() File "D:\\conda\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py", line 25, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "D:\\conda\\envs\\tensorflow\\lib\\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "D:\\conda\\envs\\tensorflow\\lib\\imp.py", line 342, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found. 从tensorflow.python.pywrap_tensorflow_internal import * File“导入tensorflow跟踪(最近一次调用是最近的):文件” D:\\ conda \\ envs \\ tensorflow \\ lib \\ site-packages \\ tensorflow \\ python \\ pywrap_tensorflow.py“,第58行D:\\ conda \\ envs \\ tensorflow \\ lib \\ site-packages \\ tensorflow \\ python \\ pywrap_tensorflow_internal.py”,第29行,在_pywrap_tensorflow_internal = swig_import_helper()文件“ D:\\ conda \\ envs \\ tensorflow \\ lib \\ site-packages \\ tensorflow \\ python \\ pywrap_tensorflow_internal.py”,第25行,在swig_import_helper _mod = imp.load_module('_ pywrap_tensorflow_internal',fp,路径名,描述)文件“ D:\\ conda \\ envs \\ tensorflow \\ lib \\ imp.py”,第243行,在load_module中返回load_dynamic(名称,文件名,文件)文件“ D:\\ conda \\ envs \\ tensorflow \\ lib \\ imp.py”,第342行,在load_dynamic中返回_load(spec)ImportError:DLL加载失败:指定的模块可以找不到。

During handling of the above exception, another exception occurred: 在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last): File "", line 1, in File "D:\\conda\\envs\\tensorflow\\lib\\site-packages\\tensorflow__init__.py", line 22, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "D:\\conda\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\python__init__.py", line 49, in from tensorflow.python import pywrap_tensorflow File "D:\\conda\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "D:\\conda\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "D:\\conda\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py", line 29, in _pywrap_tensorflow_internal = swig_import_helper() File "D:\\conda\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow_internal.py", line 25, in swig_import_helper _mod = imp.loa 追溯(最近一次调用):文件“”,行1,在文件“ D:\\ conda \\ envs \\ tensorflow \\ lib \\ site-packages \\ tensorflow__init __。py”中,行22,来自tensorflow.python import pywrap_tensorflow#pylint :disable =未使用的导入文件“ D:\\ conda \\ envs \\ tensorflow \\ lib \\ site-packages \\ tensorflow \\ python__init __。py”,第49行,来自tensorflow.python import pywrap_tensorflow文件“ D:\\ conda \\ envs \\ tensorflow \\ lib \\ site-packages \\ tensorflow \\ python \\ pywrap_tensorflow.py“,行74,在抬高ImportError(msg)ImportError:Traceback(最近一次调用为最新):文件” D:\\ conda \\ envs \\ tensorflow \\ lib \\ site-包\\ tensorflow \\ python \\ pywrap_tensorflow.py”,行58,来自tensorflow.python.pywrap_tensorflow_internal import *文件“ D:\\ conda \\ envs \\ tensorflow \\ lib \\ site-packages \\ tensorflow \\ python \\ pywrap_tensorflow_internal.py”,行29,在_pywrap_tensorflow_internal = swig_import_helper()文件中,“ D:\\ conda \\ envs \\ tensorflow \\ lib \\ site-packages \\ tensorflow \\ python \\ pywrap_tensorflow_internal.py”,第25行,在swig_import_helper _mod = imp.loa d_module('_pywrap_tensorflow_internal', fp, pathname, description) File "D:\\conda\\envs\\tensorflow\\lib\\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "D:\\conda\\envs\\tensorflow\\lib\\imp.py", line 342, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found. d_module('_ pywrap_tensorflow_internal',fp,路径名,描述)文件“ D:\\ conda \\ envs \\ tensorflow \\ lib \\ imp.py”,第243行,在load_module中返回load_dynamic(名称,文件名,文件)文件“ D:\\ conda \\ envs \\ tensorflow \\ lib \\ imp.py“,第342行,在load_dynamic返回_load(spec)ImportError中:DLL加载失败:找不到指定的模块。

Failed to load the native TensorFlow runtime. 无法加载本地TensorFlow运行时。

See https://www.tensorflow.org/install/install_sources#common_installation_problems 请参阅https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions. 出于某些常见原因和解决方案。 Include the entire stack trace above this error message when asking for help. 寻求帮助时,在此错误消息上方包括整个堆栈跟踪。

Please help me to get out of this. 请帮助我摆脱困境。 Thanks in Advance. 提前致谢。

I had same problem with you. 我也有同样的问题 After try many things, I can solved the problem with these processes. 经过尝试许多事情之后,我可以使用这些过程解决问题。

1.Created virtual environment named tensorflow with python 3.5 1.使用python 3.5创建名为tensorflow的虚拟环境

  • conda create -n tensorflow pip python-3.5 康达创建-n tensorflow pip python-3.5

2.Activate this environment and install tensorflow 2,激活这个环境并安装tensorflow

  • activate tensorflow 激活张量流
  • pip install --ignore-installed --upgrade tensorflow-gpu pip install --ignore-installed --upgrade tensorflow-gpu

For CUDA, after installed CUDA 9.0, I create new folder in drive C and copy cuDNN 7.3 for CUDA 9.0 to its. 对于CUDA,在安装CUDA 9.0之后,我在驱动器C中创建了新文件夹,并将CUDA 9.0的cuDNN 7.3复制到其中。 Then, specified CUDA system environment variable path (bin folder). 然后,指定CUDA系统环境变量路径(bin文件夹)。

In my case: C:\\tools\\cuda\\bin 就我而言:C:\\ tools \\ cuda \\ bin

Hope this can help you :) 希望这可以帮到你 :)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试安装TensorFlow- GPU ...失败,但出现ImportError:DLL加载失败:找不到指定的模块 - Trying to install TensorFlow- GPU…failed with ImportError: DLL load failed: The specified module could not be found Tensorflow 错误:ImportError: DLL 加载失败:找不到指定的模块 - Tensorflow Error: ImportError: DLL load failed: The specified module could not be found Windows 上的 Tensorflow - ImportError:DLL 加载失败:找不到指定的模块 - Tensorflow on windows - ImportError: DLL load failed: The specified module could not be found tensorflow 2.3.1 导入错误:DLL 加载失败:找不到指定的模块 - tensorflow 2.3.1 ImportError: DLL load failed: The specified module could not be found Tensorflow:ImportError:DLL 加载失败:找不到指定的模块 - Tensorflow: ImportError: DLL load failed: The specified module could not be found Unable to import tensorflow2.0,(no gpU) ImportError: DLL load failed: 找不到指定的程序 - Unable to import tensorflow2.0,(no gpU) ImportError: DLL load failed: The specified procedure could not be found 导入错误:DLL 加载失败:安装 Nvidia GPU 后找不到指定的模块 - ImportError: DLL load failed: The specified module could not be found after installing Nvidia GPU Tensorflow: ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 找不到指定的模块 - Tensorflow: ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found GDAL安装->导入错误:DLL加载失败:找不到指定的程序 - GDAL Installation -> ImportError: DLL load failed: The specified procedure could not be found Tensorflow 库导入错误:DLL 加载失败:找不到指定的程序 - Tensorflow library ImportError: DLL load failed: The specified procedure could not be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM