在Ubuntu上安装pip的正确方法 [英] Proper way to install pip on Ubuntu
问题描述
我正在尝试在官方的ubuntu/trusty64 Vagrant盒子上安装最新版本的pip(当前为8.1.2).该包装盒随附了预安装有apt-get的Python 2.7.6和3.4.3.
I'm trying to install the latest version of pip (currently 8.1.2) on the official ubuntu/trusty64 Vagrant box. The box comes with Python 2.7.6 and 3.4.3 pre-installed with apt-get.
我阅读了 pip安装文档,其中包含以下警告:>
I read the pip installation doc and it contains the following warning:
如果您使用的是由您管理的Python安装,请务必谨慎 操作系统或其他程序包管理器. get-pip.py不 与这些工具配合使用,可能会使您的系统处于 状态不一致.
Be cautious if you're using a Python install that's managed by your operating system or another package manager. get-pip.py does not coordinate with those tools, and may leave your system in an inconsistent state.
这是否意味着我无法使用get-pip.py安装pip,而只能从apt-get安装旧版本的软件?
Does that mean I cannot install pip using get-pip.py and I am limited to install an older version of it from apt-get?
如果有更好的安装方法,那会是什么?
If there is a better way of installing it, what would it be?
谢谢
推荐答案
我相信您可以使用
在Ubuntu上安装它
I believe that you can install it on Ubuntu with
sudo apt-get install python-pip
或
sudo apt-get install python3-pip
对于Python3.当然,它是一个较旧的版本,但是它具有功能.
for Python 3. Sure, it's an older version but its functionality is there.
这篇关于在Ubuntu上安装pip的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!