我目前正在使用Ubuntu16.04和Python2.7。
在尝试安装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: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 update && sudo apt upgrade --yes我也有卷曲和天资,并运行在他们各自的方法安装pip。最后,我卸载并重新安装了Python。一切都没有结果。有什么解决办法吗?
发布于 2019-08-11 10:35:07
您似乎没有安装正确的python版本。你可能想要2.7英镑。
sudo apt-get install python-minimal这应该给你推荐的版本。但是如果2.76上面的版本是这样的话:
wget https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
./configure
make
make install然后,我也会安装构建-必不可少的。
sudo apt-get install build-essential然后切换python版本。
sudo update-alternatives --config python在这个安装之后
sudo apt-get install python-piphttps://askubuntu.com/questions/934678
复制相似问题