ubuntu下不同版本python安装pip

ubuntu系统是自带python2.7(默认)和python3.4的,可以使用python -V和python3 -V查看已安装python版本。

但是在不同版本的python中ubuntu默认没有安装pip,所以需要自己手动安装pip。

(1)在不同版本中安装pip,可以使用一下命令:

sudo apt-get install python-pip

sudo apt-get install python3-pip

(2)安装完成后可以使用pip -Vpip3 -V查看看装的pip版本。

在使用pip安装其他库时,默认的python版本可以直接使用pip install XXXX

另外的python版本可以使用python3 -m pip install XXXXpip3 install XXXX


发布了9 篇原创文章 · 获赞 27 · 访问量 9万+

猜你喜欢

转载自blog.csdn.net/szw_yx/article/details/80354033
今日推荐