前言
今天在安装skimage的时候报出错误如下:
ERROR: Complete output from command python setup.py egg_info:
ERROR:
Beginning with Matplotlib 3.1, Python 3.6 or above is required.
This may be due to an out of date pip.
Make sure you have pip >= 9.0.1.
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-rar9t7jd/matplotlib/
计算机配置
操作系统:ubuntu 16.04
python版本:3.5
解决方法
刚开始直接百度,给出的解决方案包括:升级pip,升级setupTools等,这些对我都没有帮助。然后就看见了这么一句话:
Beginning with Matplotlib 3.1, Python 3.6 or above is required.
刚开始光顾着去百度,竟然忽略了这么重要一句话,意思是:从matplotlib3.1开始,需要python3.6或者更高的版本。然后我就使用
pip list
查看matplotlib的版本,果然是3.0.0,所以就果断把这个版本给删除了:
pip uninstall matplotlib
重新安装一个低版本的matplotlib:
pip install matplotlib==2.2.2
然后再安装scikit-image包:
pip install scikit-image
这样就果断安装好了,顺便还安装上去了几个依赖包:
Successfully built networkx
Installing collected packages: networkx, PyWavelets, imageio, scikit-image
Successfully installed PyWavelets-1.0.3 imageio-2.5.0 networkx-2.3 scikit-image-0.15.0
Successfully built networkx
Installing collected packages: networkx, PyWavelets, imageio, scikit-image
Successfully installed PyWavelets-1.0.3 imageio-2.5.0 networkx-2.3 scikit-image-0.15.0
总结
以后一定要第一时间先去阅读错误提示,而不是直接去百度。切记~~~~