Python 解决报错 Could not load dynamic library ‘cudnn64_8.dll‘; dlerror: cudnn64_8.dll not found

这篇具有很好参考价值的文章主要介绍了Python 解决报错 Could not load dynamic library ‘cudnn64_8.dll‘; dlerror: cudnn64_8.dll not found。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

目录

一、Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found


一、Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found

场景复现:在pycharm中运行代码时,报错

could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not f,# python,python,深度学习,人工智能,pytorch,pycharm

原因

  • 可能性1:cuda和cudnn版本不对
  • 可能性2:cudnn没有安装上

解决方法

(1)需要找到你安装的cuda位置,实在是不知道了,在命令行查找,输入set cuda即可

set cuda

could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not f,# python,python,深度学习,人工智能,pytorch,pycharm

此处,我的安装路径就是一种最常见的安装位置,

CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5
CUDA_PATH_V11_5=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5

然后到这个路径下找到bin文件,

could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not f,# python,python,深度学习,人工智能,pytorch,pycharm

打开里面确实没有cudnn64_8.dll文件。

(2)然后我们需要去下载我们所需的cudnn64_8.dll文件,

cuDNN地址如下,https://developer.nvidia.com/rdp/cudnn-download

不过要注意的是,我们需要注册一个账号,才可以进入到下载界面。大家可以放心注册的。

could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not f,# python,python,深度学习,人工智能,pytorch,pycharm

(3)然后将解压后的文件放入之前cmd找到的cuda路径下,

注意是将解压后的三个子文件夹(bin include 等)里的东西都加入到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5目录下

解压之后,

  • lib里的文件放到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\lib
  • bin里的文件放到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\bin
  • include 里的文件放到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\include
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5

 could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not f,# python,python,深度学习,人工智能,pytorch,pycharm

(4)并且重新在系统变量中环境变量中的path中添加以下三条新路径:

  • C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\cudnn\include
  • C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\cudnn\lib
  • C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\cudnn\bin

could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not f,# python,python,深度学习,人工智能,pytorch,pycharm

ok,问题解决了。文章来源地址https://www.toymoban.com/news/detail-770767.html

到了这里,关于Python 解决报错 Could not load dynamic library ‘cudnn64_8.dll‘; dlerror: cudnn64_8.dll not found的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Could not load library libcudnn_cnn_infer.so.8.的解决方法

    最近在搭建AI绘画平台,使用的是开源的Stable Diffusion WebUI,但是在启动项目的时候,会报错提示Could not load library libcudnn_cnn_infer.so.8. 具体如何搭建,可以去看我的这篇文章,或者这篇文章。 我在网上找到的解决方法,执行如下命令即可。 具体可以参考这篇文章。 在这里记录

    2024年02月11日
    浏览(36)
  • windows10 17272:error:25078067:DSO support routines:win32_load:could not load the shared library

    1.执行加密命令 2.返回错误提示 3.解决 4.重新执行生成一系列操作(ok)

    2024年02月12日
    浏览(32)
  • MacOS Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : OpenSSL library could not be loaded

    使用 brew 安装了 mssql-tools 后,用 sqlcmd 连接 SQL Server 2014 执行 SQL 脚本出现如下报错: 解决方法: 将软链接 /usr/local/opt/openssl 的源文件从 openssl@3.0 换成 openssl@1.1.

    2024年02月16日
    浏览(28)
  • Navicat16连接Oracle报错:Oracle library is not loaded

    1、有时候我们在用navicat的时候连接oracle的时候,它会提示我们 Oracle library is not loaded ,这时候我们要首先验证本机上是否已安装oracle的客户端,如果已安装客户段,navicat中的oci.dll选择我们安装的客户段的oci.dll文件 2、如果我们选中oci.dll文件之后还是报 Oracle library is not lo

    2024年02月10日
    浏览(32)
  • Jenkins 构建报错 Could not load

    在Windows和mac电脑上本地打包都可以,但是放到Jenkins上,就会找不到文件。 经过排查Linux是严格区分大小写的,win 和 mac都不区分,所以在提交代码时修改 用记事本在项目目录下的 .git 文件下 config 文件 最好在项目初始化时就设置

    2024年01月25日
    浏览(36)
  • electron使用rollup打包后,运行报错Could not dynamically require……

    同学们可以私信我加入学习群! 这报错信息意思是rollup不支持动态的require,全部报错信息为: Could not dynamically require “./src/cat”. Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work 打开软件时,报错如图: 这是

    2024年01月21日
    浏览(41)
  • Mac Could not find the GDAL library 问题解决

    https://docs.djangoproject.com/en/5.0/ref/contrib/gis/install/#macos 苹果系统 Mac 中搭建 GeoDjango 开发环境时出现以下报错: 找到 libgdal.dylib 的路径 settings.py 中添加以下代码: 找到 libgeos_c.dylib 的路径 settings.py 中添加以下代码:

    2024年01月21日
    浏览(45)
  • pyrender库报错解决方法:‘Unable to load OpenGL library’

    在 pip install pyrender 成功安装后,调用 pyrender 库时报错: OSError: (‘GL: cannot open shared object file: No such file or directory’, ‘GL’, None) ImportError: (‘Unable to load OpenGL library’, ‘GL: cannot open shared object file: No such file or directory’, ‘GL’, None) 报错截图: 这种问题一般会出现在本机/d

    2024年01月21日
    浏览(52)
  • Opencv cuda版本在ubuntu22.04中安装办法,解决Could NOT find CUDNN的办法

    解决以下安装问题: 连接地址: https://developer.nvidia.com/cuda-downloads?target_os=Linuxtarget_arch=x86_64Distribution=Ubuntutarget_version=22.04target_type=runfile_local 注意,请下载对应驱动的版本。 默认驱动和 cuda toolkit都会安装成功! 官网下载cuda对应版本的cudnn: https://developer.nvidia.com/rdp/cudnn-arch

    2024年02月03日
    浏览(41)
  • 解决 Centos 安装 Python 3.10 的报错: Could not import runpy module

    操作环境 : CentOS 7 、 Gcc 4.8.5 、 Python 3.10.0 系统上已经有 2.x , 3.6 版本的 Python 了,但是还是想装一个 3.10 的。因为刚写的脚本文件是较高版本的,在 3.6 上无法正常运行, Python 语法不是很了解,只能从环境上下手了。 【注】Python 其他版本也适用,毕竟是编译器的问题,并

    2024年02月03日
    浏览(46)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包