Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #1944

Closed
729973389 opened this issue Aug 25, 2024 · 10 comments
Assignees

Comments

@729973389
Copy link

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
Copy link
Author

729973389 commented Aug 25, 2024

微信图片_20240825170725

@UserWangZz
Copy link
Collaborator

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

@ChengMing520
Copy link

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

@729973389
Copy link
Author

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

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

@729973389
Copy link
Author

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

你解决了这个问题了吗?

@729973389
Copy link
Author

这个路径看着有点问题不知道为什么会出/../,可以检查一下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,是不是这个环节出现了问题?

@UserWangZz
Copy link
Collaborator

这个路径看着有点问题不知道为什么会出/../,可以检查一下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版本是多少呢?我这边复现一下

@danielcamara
Copy link

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.

@UserWangZz
Copy link
Collaborator

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.

@TingquanGao
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@TingquanGao @danielcamara @UserWangZz @729973389 @zhang-prog @ChengMing520 and others