【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

posted on 2020-05-01 09:29  丁错儿  阅读(28)  评论(0编辑  收藏  举报

导航