ImportError: Could not find ‘cudart64_100.dll‘

tensorflow+cuda+cudnn测试tensorflow是否安装成功时报错

ImportError: Could not find ‘cudart64_100.dll’. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 10.0 from this URL: https://developer.nvidia.com/cuda-90-download-archive

我的配置信息:

  • cuda:10.1.105
  • cudnn 10.1
  • tensorflow 2.0.0
    根据报错信息来看是缺少cudart64_100.dll,然后让我们降级回10.0
    在之前我的环境变量都是完整配置过的,那么首先查看cuda的路径下是否存在该文件:
    通过C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA(你的cuda安装路径)路径访问cuda,在其bin目录下查找是否有cudart64_100.dll模块
    如果有,则查看环境变量是否添加;我的是没有这个文件,参照官网配置TensorFlow GPU支持看到
    在这里插入图片描述
    我的cuda和cudnn版本都是没有问题的,所以重新安装了tensorflow
pip install tensorflow  # 稳定版

此时tensorflow版本变为2.3.0

测试

打开cmd 输入python进入python环境

import tensorflow as tf
tf.test.is_gpu_available()

在这里插入图片描述
希望大家运行结果都是true

我的最终配置

  • cuda:10.1.105
  • cudnn 10.1
  • tensorflow 2.3.0

参考文献:
CUDA、CUDNN在windows下的安装及配置
GPU 支持
问题解决之“nvcc”不是内部或外部命令
tensorflow遇到ImportError: Could not find 'cudart64_100.dll’错误解决

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值