需要帮助安装 pip

需要帮助安装 pip

我当前的 pip 安装有问题。运行命令 pip -v 显示它是为 python 3.10 安装的,而不是 python2:

└─# pip -V
pip 22.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

当我尝试为 python 2 手动安装 pip 时出现以下错误:

└─# sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree... Done
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:
 python3-pip-whl : Breaks: python-pip-whl (< 21.3.1+dfsg-2~) but 18.1-5 is to be installed
 python3-setuptools-whl : Breaks: python-pip-whl (< 21.3.1+dfsg-2~) but 18.1-5 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

任何帮助都将不胜感激,我正在尝试为 python2 安装 pip 和为 python 3 安装 pip3(每个 python 版本都有自己的 pip,如果有意义的话!)

提前致谢。

相关内容