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

昇腾 NPU import paddle 报错:libatb.so: cannot open shared object file: No such file or directory #65797

Closed
saysbye opened this issue Jul 8, 2024 · 5 comments
Labels

Comments

@saysbye
Copy link

saysbye commented Jul 8, 2024

bug描述 Describe the Bug

在使用paddle时,import paddle这一行代码出现以下报错:

I0708 15:01:14.136582 96875 init.cc:236] ENV [CUSTOM_DEVICE_ROOT]=/usr/local/python3.10/lib/python3.10/site-packages/paddle_custom_device
I0708 15:01:14.136629 96875 init.cc:145] Try loading custom device libs from: [/usr/local/python3.10/lib/python3.10/site-packages/paddle_custom_device]
Traceback (most recent call last):
  File "/app/code/npu_paddle_ocr.py", line 12, in <module>
    import paddle
  File "/usr/local/python3.10/lib/python3.10/site-packages/paddle/__init__.py", line 37, in <module>
    from .base import core  # noqa: F401
  File "/usr/local/python3.10/lib/python3.10/site-packages/paddle/base/__init__.py", line 207, in <module>
    __bootstrap__()
  File "/usr/local/python3.10/lib/python3.10/site-packages/paddle/base/__init__.py", line 199, in __bootstrap__
    core.init_devices()
ValueError: (InvalidArgument) Fail to open library: /usr/local/python3.10/lib/python3.10/site-packages/paddle_custom_device/libpaddle-custom-npu.so with error: libatb.so: cannot open shared object file: No such file or directory
  [Hint: dso_handle should not be null.] (at /paddle/paddle/fluid/platform/init.cc:152)

python版本:3.10.7
Linux host-10-10-236-246 4.18.0-193.28.1.el7.aarch64 #1 SMP Wed Oct 21 16:25:35 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
npu-smi 信息如下:
image

安装paddle的命令:
pip install paddlepaddle -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
pip install paddle-custom-npu -i https://www.paddlepaddle.org.cn/packages/nightly/npu/

其他补充信息 Additional Supplementary Information

No response

@saysbye saysbye changed the title import paddle 报错:libatb.so: cannot open shared object file: No such file or directory 昇腾 NPU import paddle 报错:libatb.so: cannot open shared object file: No such file or directory Jul 8, 2024
@tianhaodongbd
Copy link
Contributor

你好,这个问题可通过source set_env.sh解决,请find当前环境atb/set_env.sh的路径,参考命令:source xxx/Ascend/mindie/latest/mindie-rt/mindie-atb/atb/set_env.sh

@saysbye
Copy link
Author

saysbye commented Jul 8, 2024

搞定了,谢谢🙏

@saysbye saysbye closed this as completed Jul 8, 2024
@paddle-bot paddle-bot bot added status/close 已关闭 and removed status/new-issue 新建 labels Jul 8, 2024
@liujiachang
Copy link

请问set_env.sh的路径在哪,能否给个样例

@ztyf-lq
Copy link

ztyf-lq commented Oct 17, 2024

现在社区版CANN安装好像没有atb这个目录了?

@FAFUuser
Copy link

find

大哥 如何解决的?

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

No branches or pull requests

5 participants