python在linux环境下安装skimage的示例代码
导读
一.执行代码
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'
ps:下面看下安装skimage不成功,解决
sudo pip3 install --upgrade setuptools sudo pip3 install scikit-image -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com //后面为镜像源加速
评论(0)