前言
今天在安裝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
總結
以後一定要第一時間先去閱讀錯誤提示,而不是直接去百度。切記~~~~