python在linux环境下安装skimage

python在linux环境下安装skimage[Python常见问题]

一.执行代码

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"
hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » python在linux环境下安装skimage