【Linux】Ubuntu18.04使用【python2】安裝PIL、opencv、numpy、matplotlib、pandas、seaborn

參考:https://blog.csdn.net/qionggaobi9328/article/details/103986827

1、查詢查詢默認pip版本

pip -V

如果出來打的結果是python3.x,需要安裝python2下的pip。

2、爲python2安裝pip

如果出來打的結果是python3.x,爲python2安裝pip工具:

sudo apt install python-pip

3、使用pip給python2環境裝軟件一般方法

python2 -m pip install XXX

4、具體安裝PIL(Pillow)、opencv、numpy、matplotlib、pandas、seaborn

使用豆瓣源安裝,下載更快哦:

python2 -m pip install Pillow #安裝圖像處理模塊

python2 -m pip install opencv-python -i http://pypi.douban.com/simple --trusted-host pypi.douban.com #安裝圖像處理模塊opencv

python2 -m pip install numpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com #安裝numpy

python2 -m pip install matplotlib -i http://pypi.douban.com/simple --trusted-host pypi.douban.com #安裝matplotlib

python2 -m pip install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com #安裝pandas

python2 -m pip install seaborn scipy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com #安裝seaborn
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章