获取so文件
移动至lib-dynload
mv _bz2.cpython-36m-x86_64-linux-gnu.so /usr/local/python3/lib/python3.X/lib-dynload/_bz2.cpython-3X(指定版本)m-x86_64-linux-gnu.so
添加执行权限
chmod +x _bz2.cpython-3Xm-x86_64-linux-gnu.so
下载相关依赖
yum install bzip2-devel
yum install xz-devel
yum install python-backports-lzma
pip3 install backports.lzma
更改lzma倒入依赖
vim /usr/local/python3/lib/python3.X/lzma.py
将原始:
from _lzma import *
from _lzma import _encode_filter_properties, _decode_filter_properties
改为:
try:
from _lzma import *
from _lzma import _encode_filter_properties, _decode_filter_properties
except ImportError:
from backports.lzma import *
from backports.lzma import _encode_filter_properties, _decode_filter_properties