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'llneedtoupgrade pip.

Additionally,pipwill already be installed if you're working in aVirtualEnvironmentcreated byvirtualenvorpyvenv.

Installing with get-pip.py

To install pip,securely downloadget-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.

相关文章

ubuntu退出redis的示例:指定配置文件方式启动源码redis:roo...
ubuntu中mysql改密码忘了的解决方法:1.在终端中切换到root权...
ubuntu安装mysql失败的解决方法原因:可能是原有的MySQL还有...
使用centos和ubuntu建站的区别有以下几点1.CentOS是Linux发行...
ubuntu图形界面和字符界面切换的方法:可以通过快捷键CTRL+A...
ubuntu中重启mysql失败的解决方法1.首先,在ubuntu命令行中,...