Paddle 安装成功,import报错

dwbf0jvd  于 2023-02-04  发布在  其他
关注(0)|答案(4)|浏览(1765)

bug描述 Describe the Bug

服务器是UOS系统,鲲鹏920处理器,按照paddle官网步骤源码编译,生产whl包,安装成功,但是import paddle验证时报错,依赖包什么的都有安装,试过把libpaddle.so加入系统变量,但还是报一样的错误。请问有什么好方法解决吗?

(wxy3.7) root@yuanfeng-PC:/tmp/yfenty/Paddle/build# python
Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:22:24)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import paddle
Error: Can not import paddle core while this file exists: /root/anaconda3/envs/wxy3.7/lib/python3.7/site-packages/paddle/fluid/libpaddle.so
Traceback (most recent call last):
File "/root/anaconda3/envs/wxy3.7/lib/python3.7/site-packages/paddle/fluid/core.py", line 268, in
from . import libpaddle
ImportError: /root/anaconda3/envs/wxy3.7/lib/python3.7/site-packages/paddle/fluid/libpaddle.so: ELF load command alignment not page-aligned

During handling of the above exception, another exception occurred:

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

其他补充信息 Additional Supplementary Information

No response

wyyhbhjk

wyyhbhjk1#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网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!

j2qf4p5b

j2qf4p5b2#

你好,请问是按照 https://www.paddlepaddle.org.cn/documentation/docs/zh/install/compile/arm-compile.html 这里的说明进行编译安装的吗?

另外请确保目录 /root/anaconda3/envs/wxy3.7/lib/python3.7/site-packages/paddle/ 的 paddle 是你编译产生的版本。

unhi4e5o

unhi4e5o3#

您好,谢谢你的回复
我是按照您这个地址链接编译安装的。目录确实是编译产生的版本,下面这个图片是具体编译产生的文件

fnx2tebb

fnx2tebb4#

问题解决了,UOS源码编译必须要开个VPN,开完vpn源码编译成功

相关问题