Paddle踩坑1:libpython3.10.so.1.0

这篇具有很好参考价值的文章主要介绍了Paddle踩坑1:libpython3.10.so.1.0。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Paddle安装踩坑集锦

遇到的问题:

安装Paddle之后import paddle的时候报了一个错:

>>> import paddle
Error: Can not import paddle core while this file exists: /opt/conda/envs/piddle/lib/python3.10/site-packages/paddle/fluid/libpaddle.so
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/envs/piddle/lib/python3.10/site-packages/paddle/__init__.py", line 25, in <module>
    from .framework import monkey_patch_variable
  File "/opt/conda/envs/piddle/lib/python3.10/site-packages/paddle/framework/__init__.py", line 17, in <module>
    from . import random  # noqa: F401
  File "/opt/conda/envs/piddle/lib/python3.10/site-packages/paddle/framework/random.py", line 16, in <module>
    import paddle.fluid as fluid
  File "/opt/conda/envs/piddle/lib/python3.10/site-packages/paddle/fluid/__init__.py", line 36, in <module>
    from . import framework
  File "/opt/conda/envs/piddle/lib/python3.10/site-packages/paddle/fluid/framework.py", line 37, in <module>
    from . import core
  File "/opt/conda/envs/piddle/lib/python3.10/site-packages/paddle/fluid/core.py", line 304, in <module>
    raise e
  File "/opt/conda/envs/piddle/lib/python3.10/site-packages/paddle/fluid/core.py", line 249, in <module>
    from . import libpaddle
ImportError: libpython3.10.so.1.0: cannot open shared object file: No such file or directory
>>>

主要核心就是:libpython3.10.so.1.0: cannot open shared object file: No such file or directory

解决方式

第一步:

终端中输入:

find / -name libpython3.10.so.1.0

然后会得到一个反馈结果:

(nlp) root@n1:~# find / -name libpython3.7m.so.1.0
find: ‘/home/peterpark’: Permission denied
/opt/conda/envs/nlp/lib/libpython3.7m.so.1.0
/opt/conda/lib/libpython3.7m.so.1.0
/opt/conda/pkgs/python-3.7.11-h12debd9_0/lib/libpython3.7m.so.1.0
/opt/conda/pkgs/python-3.7.15-h7a1cb2a_1/lib/libpython3.7m.so.1.0
find: ‘/proc/tty/driver’: Permission denied
find: ‘/proc/27/map_files’: Permission denied

第二步:

选中一个目录,执行下面操作:

cp /opt/conda/envs/nlp/lib/libpython3.7m.so.1.0 /usr/lib

然后问题就解决啦!码字不易点个赞!!!文章来源地址https://www.toymoban.com/news/detail-608016.html

到了这里,关于Paddle踩坑1:libpython3.10.so.1.0的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包