首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pip安装错误Ubuntu 16.04

Pip安装错误Ubuntu 16.04
EN

Ask Ubuntu用户
提问于 2017-07-10 06:30:44
回答 1查看 1.8K关注 0票数 0

我目前正在使用Ubuntu16.04和Python2.7。

在尝试安装pip之后,我得到以下错误

代码语言:javascript
复制
~$ 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: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.

我通过运行

代码语言:javascript
复制
sudo apt update && sudo apt upgrade --yes

我也有卷曲和天资,并运行在他们各自的方法安装pip。最后,我卸载并重新安装了Python。一切都没有结果。有什么解决办法吗?

EN

回答 1

Ask Ubuntu用户

发布于 2019-08-11 10:35:07

您似乎没有安装正确的python版本。你可能想要2.7英镑。

代码语言:javascript
复制
sudo apt-get install python-minimal

这应该给你推荐的版本。但是如果2.76上面的版本是这样的话:

代码语言:javascript
复制
wget  https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz  
./configure
make
make install

然后,我也会安装构建-必不可少的。

代码语言:javascript
复制
sudo apt-get install build-essential

然后切换python版本。

代码语言:javascript
复制
sudo update-alternatives --config python

在这个安装之后

代码语言:javascript
复制
sudo apt-get install python-pip
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/934678

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档