ubuntu 14.04 安装 pip出现包依赖问题(This may mean that you have requested an impossible situation or ifyou ar

ubuntu 14.04 安装 pip 出现包依赖问题(This may mean that you have requested an impossible situation or ifyou are using the unstable distribution that some required packages have notyet been created or been moved out of Incoming)

1.错误描述:

Some packages could not be installed. This may meanthat 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-pip-whl (= 1.5.4-1ubuntu4) but it is notgoing to be installed
             Recommends: build-essential but it is not going to be installed
             Recommends: python-dev-all (>= 2.6) but it is not installable
             Recommends: python-wheel but it is not installable
 

E: Unable to correctproblems, you have held broken packages.

 

2.解决方法

我试了aptitude, 但是没能解决,于是直接用Python命令安装pip,而不是用apt-get安装。

1.去 https://pip.pypa.io/en/stable/installing/#using-linux-package-managers

下载 get-pip.py

2.在放有get-pip.py的目录下打开终端,输入

sudo python get-pip.py

然后应该就可以安装完成了。然后试试命令 pip --version看看是否安装成功。

参考https://pip.pypa.io/en/stable/installing/#using-linux-package-managers

 

Installation

Do I need to install pip?

pip is alreadyinstalled if you're using Python 2 >=2.7.9 or Python 3 >=3.4binariesdownloaded frompython.org, but you'llneedto upgrade pip.

Additionally, pipwill already be installed if you're working in a VirtualEnvironment created byvirtualenv or pyvenv.

Installing with get-pip.py

To install pip, securely download get-pip.py[2]

Then run the following:

python get-pip.py

Warning

Be cautious if you'reusing a Python install that's managed by your operatingsystem or anotherpackage manager. get-pip.py does not coordinate withthose tools, and may leaveyour system in an inconsistent state.

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值