centos pyinstaller 打包问题 not found: libpython3.8.so.1.0,

问题 :centos中打包出现如下错误的时候,是因为缺少libpython3.8.so.1.0库,需要重新配置一些参数后编译python.

OSError: Python library not found: libpython3.8.so.1.0, libpython3.8mu.so.1.0, libpython3.8m.so.1.0, libpython3.8m.so, libpython3.8.so
    This means your Python installation does not come with proper shared library files.

解决步骤:

(1) 找到python源码解压后的路径

cd /home/ttt/Python-3.8.8 

(2) 配置参数

./configure --prefix=/usr/local/python3 --enable-shared --with-ssl 

(3) 重新安装 python

make &make install

 (4)查找库文件

find / -name libpython3.8.so.1.0

 查到对应的文件如下:  /home/ttt/Python-3.8.8/libpython3.8.so.1.0
  find: ‘/run/user/1000/doc’: 权限不够
   find: ‘/run/user/1000/gvfs’: 权限不够
 

(5)复制库文件到系统目录

cp /home/ttt/Python-3.8.8/libpython3.8.so.1.0 /usr/lib64/

 (6) 重新打包

pyinstaller -F xx.py 

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值