PaddleX icon indicating copy to clipboard operation
PaddleX copied to clipboard

import paddle错误 Error loading "D:\anaconda\envs\PaddleX\lib\site-packages\paddle\..\nvidia\cudnn\bin\cudnn_adv_infer64_8.dll" or one of its dependencies.

Open 729973389 opened this issue 1 year ago • 6 comments

import paddle时出现的错误 OSError: [WinError 127] 找不到指定的程序。 Error loading "D:\anaconda\envs\PaddleX\lib\site-packages\paddle..\nvidia\cudnn\bin\cudnn_adv_infer64_8.dll" or one of its dependencies.

该conda环境下已配置好cuda 和cudnn,并且在这个路径也找到了该文件

729973389 avatar Aug 25 '24 09:08 729973389

微信图片_20240825170725

729973389 avatar Aug 25 '24 09:08 729973389

这个路径看着有点问题不知道为什么会出/../,可以检查一下cudnn安装是否正确,环境变量设置是否正确,如果无误,尝试重新安装一下paddle

UserWangZz avatar Aug 26 '24 03:08 UserWangZz

请问解决这个问题了吗,我也是同样的问题

ChengMing520 avatar Aug 26 '24 03:08 ChengMing520

请问解决这个问题了吗,我也是同样的问题

还没有解决,我重装过cudnn,还是会出现这个问题

729973389 avatar Aug 28 '24 05:08 729973389

请问解决这个问题了吗,我也是同样的问题

你解决了这个问题了吗?

729973389 avatar Aug 28 '24 05:08 729973389

这个路径看着有点问题不知道为什么会出/../,可以检查一下cudnn安装是否正确,环境变量设置是否正确,如果无误,尝试重新安装一下paddle 我先使用的pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118 安装好了torch并且确认cuda可以使用了后再安装的paddle,是不是这个环节出现了问题?

729973389 avatar Aug 28 '24 05:08 729973389

这个路径看着有点问题不知道为什么会出/../,可以检查一下cudnn安装是否正确,环境变量设置是否正确,如果无误,尝试重新安装一下paddle 我先使用的pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118 安装好了torch并且确认cuda可以使用了后再安装的paddle,是不是这个环节出现了问题?

请问你的paddle版本是多少呢?我这边复现一下

UserWangZz avatar Aug 29 '24 11:08 UserWangZz

I have the same problem, I have tried different configurations to install paddleOCR, with similar error messages. My System:

  • Windows 11
  • Intel i9
  • Nvidia GeForce 4090 Laptop GPU
  • CUDA Version: 12.4
  • Driver Version: 551.88
  • Python 3.10.10
  • PaddlePaddle - python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu123/
  • PaddleOcr : pip install paddleocr==2.8.1
  • Torch: pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
  • paddle.utils.run_check() Running verify PaddlePaddle program ... I0831 05:29:36.690510 30220 program_interpreter.cc:243] New Executor is Running. W0831 05:29:36.691514 30220 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 8.9, Driver API Version: 12.4, Runtime API Version: 12.3 W0831 05:29:36.691514 30220 gpu_resources.cc:164] device: 0, cuDNN Version: 9.0. I0831 05:29:36.735471 30220 interpreter_util.cc:648] Standalone Executor is Used. PaddlePaddle works well on 1 GPU. PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

The error message I am getting now is:

Traceback (most recent call last):
  File "C:\opt\PycharmProjects\numea\main.py", line 9, in <module>
    from paddleocr import PaddleOCR
  File "C:\opt\PycharmProjects\numea\venv_paddle\lib\site-packages\paddleocr\__init__.py", line 14, in <module>
    from .paddleocr import *
  File "C:\opt\PycharmProjects\numea\venv_paddle\lib\site-packages\paddleocr\paddleocr.py", line 21, in <module>
    import paddle
  File "C:\opt\PycharmProjects\numea\venv_paddle\lib\site-packages\paddle\__init__.py", line 712, in <module>
    raise err
OSError: [WinError 127] La procédure spécifiée est introuvable. Error loading "C:\opt\PycharmProjects\numea\venv_paddle\lib\site-packages\paddle\..\nvidia\cudnn\bin\cudnn_cnn64_9.dll" or one of its dependencies.

The requested folder, and dll exists:

> dir C:\opt\PycharmProjects\numea\venv_paddle\lib\site-packages\paddle\..\nvidia\cudnn\bin\
 Le volume dans le lecteur C s’appelle Windows
 Le numéro de série du volume est 24CC-7871

 Répertoire de C:\opt\PycharmProjects\numea\venv_paddle\lib\site-packages\nvidia\cudnn\bin

31/08/2024  05:24    <DIR>          .
31/08/2024  05:24    <DIR>          ..
31/08/2024  05:24           438 840 cudnn64_9.dll
31/08/2024  05:24       240 979 496 cudnn_adv64_9.dll
31/08/2024  05:24         4 006 952 cudnn_cnn64_9.dll
31/08/2024  05:24       590 665 272 cudnn_engines_precompiled64_9.dll
31/08/2024  05:24        11 783 224 cudnn_engines_runtime_compiled64_9.dll
31/08/2024  05:24         2 162 216 cudnn_graph64_9.dll
31/08/2024  05:24        86 918 712 cudnn_heuristic64_9.dll
31/08/2024  05:24       107 870 760 cudnn_ops64_9.dll
31/08/2024  05:24                 0 __init__.py
31/08/2024  05:24    <DIR>          __pycache__
               9 fichier(s)    1 044 825 472 octets
               3 Rép(s)  324 914 438 144 octets libres

you can see that the cudnn64_9.dll is there, the ".." is not a problem as it is just a reference to the previous folder, from the paddle one! It is the third time I am installing everything in a different venv.

danielcamara avatar Aug 31 '24 04:08 danielcamara

This because pytorch and paddle relay on different nvidia-cudnn-cu version. look like this picture: image but in the Linux platform it can import paddle normaly. So maybe you need to down the version of nvidia-cudnn-cuxx, etc., or uninstall pytorch and reinstall paddle, and try to see if it can be imported normally.

UserWangZz avatar Sep 02 '24 09:09 UserWangZz

The issue has no response for a long time and will be closed. You can reopen or new another issue if are still confused.


From Bot

TingquanGao avatar Oct 03 '24 12:10 TingquanGao