无法在Ubuntu 14.04上安装python pip

无法在Ubuntu 14.04上安装python pip,python,ubuntu,pip,Python,Ubuntu,Pip,这是我用来安装python pip的命令 sudo apt-get install python-pip 我得到以下错误 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible si

这是我用来安装python pip的命令

sudo apt-get install python-pip
我得到以下错误

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 python-pip : Depends: python-setuptools (>= 0.6c1) but it is not going to be installed
              Recommends: python-dev-all (>= 2.6) but it is not installable
E: Unable to correct problems, you have held broken packages.
我已经安装了python dev的最新版本

当我尝试使用安装python setuptools时
sudo apt get install python setuptools
我得到以下错误

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 python-setuptools : Depends: python-pkg-resources (= 3.3-1ubuntu1) but 3.3-1ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.
向我解释如何解决错误,并指导我安装
python pip
的步骤。

然后运行以下操作(可能需要管理员访问):

这会让你走的。
如果您再次陷入困境,请阅读此处:

在我安装python pip时遇到相同的错误,以下命令解决了我的问题

sudo apt-get install python-pkg-resources=3.3-1ubuntu1
sudo apt-get install python-setuptools

除了@推荐的解决方案之外,我还必须运行这个

apt-get update
(或)


我想你应该试试:

sudo apt-get install python-pkg-resources=3.3-1ubuntu1
然后:

sudo apt-get install python-pip python-dev build-essential
这肯定会解决你的问题

请运行此命令:

sudo apt-get update 
然后安装python工具:

 sudo apt-get install python-pip
 sudo apt-get install python-dev
 sudo apt-get install build-essential

所有软件包都将安装,或者其中一些软件包可能会说它已经是最新版本了,这很好

我也有同样的问题,最终我放弃了使用:

sudo apt-get install python-pip
在尝试类似以下内容之后:

sudo apt-get install python-setuptools python-dev build-essential 
但是没有运气。 所以我当时所做的就是:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py

放心吧……

试着运行
sudo-apt-get-autoremove
sudo-apt-get-update
sudo-apt-get-upgrade
然后安装pip调试apt问题不是编程主题。你可能会得到更好的帮助;但请意识到这是一个常见问题,所以请在询问之前搜索。至少要注意需要包括哪些详细信息才能正确诊断根本原因(非标准源?)Hi有类似的问题,我想问您这个命令
sudo apt get install python pkg resources=3.3-1ubuntu1
的意思是什么?因为在我的VPS中,如果我运行此命令,将降级我的
python pkg资源
sudo apt-get install python-setuptools python-dev build-essential 
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py