安装tensorflow-gpu,相关报错的解决办法

1、报错内容
C:\Users\Administrator\anaconda3\envs\py3.6\python.exe D:/F1/exercise/wangyi/ai_tang/shen_du/ten2_test/test1.py
Traceback (most recent call last):
File “C:\Users\Administrator\anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “D:/F1/exercise/wangyi/ai_tang/shen_du/ten2_test/test1.py”, line 2, in
import tensorflow
File “C:\Users\Administrator\anaconda3\envs\py3.6\lib\site-packages\tensorflow_init_.py”, line 41, in
from tensorflow.python.tools import module_util as module_util
File "C:\Users\Administrator\anaconda3\envs\py3.6\lib\site-packages\tensorflow\python_init
.py", line 40, in
from tensorflow.python.eager import context
File “C:\Users\Administrator\anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\eager\context.py”, line 35, in
from tensorflow.python import pywrap_tfe
File “C:\Users\Administrator\anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\pywrap_tfe.py”, line 28, in
from tensorflow.python import pywrap_tensorflow
File “C:\Users\Administrator\anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 83, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “C:\Users\Administrator\anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
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.

2、解决办法
安装2.1.0版本程序包需要msvcp140_1.dll文件,点击上图中的Microsoft VC++ downloads下载安装包并下载,即可成功导入Tensorflow。
在这里插入图片描述
下载地址:https://support.microsoft.com/zh-cn/help/2977003/the-latest-supported-visual-c-downloads

3 继续报错
安装完成后碰到的问题:运行tensorflow时,出现ImportError: DLL load failed:找不到指定的模块:
cublas64_100.dll
cusolver64_100.dll
cudart_64_100.dll
解决办法:

先进入路径‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin’,复制下面三个文件到桌面,改名字为上述找不到指定模块的名称,改完后,再粘贴回去,tensorflow就能成功运行了。
cublas64_10.dll
cusolver64_10.dll
cudart64_101.dll

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值