python - 安装 python-pip 和 python-dev 时未满足的依赖项

标签 python

如上所述,我尝试使用命令安装 python-pip 和 python-dev:

sudo apt-get install python-pip python-dev

然后我得到:

sudo apt-get install python-pip python-dev
[sudo] password for tailongnguyen: 
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-dev : Depends: python (= 2.7.11-1) but 2.7.12-1 is to be installed
python-pip : Depends: python:any (< 2.8)
          Depends: python:any (>= 2.7.5-5~)
          Recommends: python-all-dev (>= 2.6) but it is not going to be installed
          Recommends: python-setuptools but it is not going to be installed
          Recommends: python-wheel but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我现在需要做什么? 我试过了

sudo apt-get update 
sudo apt-get upgrade

但是没用

最佳答案

请参阅此链接。这解决了这个问题,虽然我在解决这个问题后遇到了与 apache2.2-common 类似的问题。

https://askubuntu.com/questions/275861/problem-installing-python-dev

关于python - 安装 python-pip 和 python-dev 时未满足的依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42487275/

相关文章:

python - 在 Python 2.6 中,如何将列表对象传递给需要参数列表的方法?

Python - 列表理解,二维列表

python - 处理文件读取和多个值到字典中的键

python 检查 json.dumps 是否可行

python - 在 python 中为什么使用 except :

python - 使用 python 2.7.8 创建基本的 docker centos 图像

python - 如果值包含字符串,则设置另一个列值

python - 如何根据用户输入创建不同的变量

python - 如何从 Django 中的项目级包导入而不与同名的应用程序级模块冲突?

python - Tensorflow - LSTM - 'Tensor' 对象不可迭代