一.执行代码
yum install xz-devel
yum install python-backports-lzma
pip3 install scikit-image
pip3 install backports.lzma
二.修改文件
修改文件路径
/usr/local/python3/lib/python3.6/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
不然会报异常
ModuleNotFoundError: No module named '_lzma'