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

Can not import paddle core while this file exists: /path/to/libpaddle.so #48243

Open
wj-Mcat opened this issue Nov 22, 2022 · 10 comments
Open

Can not import paddle core while this file exists: /path/to/libpaddle.so #48243

wj-Mcat opened this issue Nov 22, 2022 · 10 comments
Assignees
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/new-issue 新建 type/build 编译/安装问题

Comments

@wj-Mcat
Copy link
Contributor

wj-Mcat commented Nov 22, 2022

问题描述 Issue Description

在 python3.8/3.7环境下安装完paddlepaddle==2.4.0之后,不能导入libpaddle.so文件。

可是我从 pypi server 上面下载了对应版本的whl包解压之后发现里面还是有对应的libpaddle.so文件,就感觉到很奇怪。

我在paddlenlp 的一个 pr 里面尝试解决此问题:https://github.com/PaddlePaddle/PaddleNLP/pull/3859。

详细的编译信息请看:https://readthedocs.org/api/v2/build/18703479.txt

版本&环境信息 Version & Environment Information

具体环境请看:
PaddlePaddle == 2.4.0
python 3.7
centos

由于程序是运行在readthedocs 服务器上,更相信的环境信息这边是没办法拿到,你们可以通过日志查看更多详细信息。

@wj-Mcat wj-Mcat added status/new-issue 新建 type/build 编译/安装问题 labels Nov 22, 2022
@paddle-bot
Copy link

paddle-bot bot commented Nov 22, 2022

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

@minghaoBD
Copy link
Contributor

可以暂时使用2.3.x版本。我这边测试2.4尚不稳定,正在联系相关同学确定问题。

@wj-Mcat
Copy link
Contributor Author

wj-Mcat commented Nov 22, 2022

好的,感谢回复。

@paddle-bot-old paddle-bot-old bot added the PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc label Nov 28, 2022
@yt605155624
Copy link
Contributor

yt605155624 commented Dec 2, 2022

赞,刚好遇到了这个问题

@linnnn1
Copy link

linnnn1 commented Mar 28, 2023

请问您是怎么解决这个问题的呢?

@www516717402
Copy link

@linnnn1 直接回退使用2.3.*版本就行了,搞不懂这paddle团队发布新版本都不进行大量测试的吗?

@hjing100
Copy link

docker环境部署
python3.7
请问,安装2.3.2还是显示Error: Can not import avx core while this file exists: /usr/local/lib/python3.7/site-packages/paddle/fluid/core_avx.so

@quelle1
Copy link

quelle1 commented Apr 28, 2023

CPU:ft1500,
system: kylin v4,
paddlepaddle:v2.4.1,v2.4.2,v2.4.3 自己下载的代码进行编译,都会出现下面的问题

Python 3.7.16 (default, Apr 12 2023, 12:22:04)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.

import paddle
Error: Can not import paddle core while this file exists: /usr/local/lib/python3.7/site-packages/paddle/fluid/libpaddle.so
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/paddle/fluid/core.py", line 249, in
from . import libpaddle
ImportError: /usr/local/lib/python3.7/site-packages/paddle/fluid/libpaddle.so: undefined symbol: shm_unlink

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/site-packages/paddle/init.py", line 25, in
from .framework import monkey_patch_variable
File "/usr/local/lib/python3.7/site-packages/paddle/framework/init.py", line 17, in
from . import random # noqa: F401
File "/usr/local/lib/python3.7/site-packages/paddle/framework/random.py", line 16, in
import paddle.fluid as fluid
File "/usr/local/lib/python3.7/site-packages/paddle/fluid/init.py", line 36, in
from . import framework
File "/usr/local/lib/python3.7/site-packages/paddle/fluid/framework.py", line 37, in
from . import core
File "/usr/local/lib/python3.7/site-packages/paddle/fluid/core.py", line 300, in
if not avx_supported() and libpaddle.is_compiled_with_avx():
NameError: name 'libpaddle' is not defined

@1040242795
Copy link

1040242795 commented Aug 3, 2023

@linnnn1 > 发

你好,建议你根据这个链接:
https://blog.csdn.net/weixin_43021830/article/details/128243800
先将缺失的文件cp到/usr/lib,
然后可能会出现
ImportError: /home/veteran/anaconda3/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/veteran/anaconda3/envs/paddle/lib/python3.9/site-packages/paddle/fluid/libpaddle.so)
关于这个问题,可以根据这个链接解决
https://blog.csdn.net/bohrium/article/details/126546521

@Zomun
Copy link

Zomun commented May 30, 2024

(ser) root@ps:/home/SER-multitask-main2# python infer_batch.py
Error: Can not import paddle core while this file exists: /root/anaconda3/envs/ser/lib/python3.8/site-packages/paddle/fluid/libpaddle.so
Traceback (most recent call last):
File "infer_batch.py", line 6, in
import paddle
File "/root/anaconda3/envs/ser/lib/python3.8/site-packages/paddle/init.py", line 25, in
from .framework import monkey_patch_variable
File "/root/anaconda3/envs/ser/lib/python3.8/site-packages/paddle/framework/init.py", line 17, in
from . import random # noqa: F401
File "/root/anaconda3/envs/ser/lib/python3.8/site-packages/paddle/framework/random.py", line 16, in
import paddle.fluid as fluid
File "/root/anaconda3/envs/ser/lib/python3.8/site-packages/paddle/fluid/init.py", line 36, in
from . import framework
File "/root/anaconda3/envs/ser/lib/python3.8/site-packages/paddle/fluid/framework.py", line 37, in
from . import core
File "/root/anaconda3/envs/ser/lib/python3.8/site-packages/paddle/fluid/core.py", line 338, in
raise e
File "/root/anaconda3/envs/ser/lib/python3.8/site-packages/paddle/fluid/core.py", line 274, in
from . import libpaddle
ImportError: libcudart.so.10.2: cannot open shared object file: No such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/new-issue 新建 type/build 编译/安装问题
Projects
None yet
Development

No branches or pull requests

9 participants