尝试在 Ubuntu 18.04 中安装 python3-pip 时未满足的依赖关系

尝试在 Ubuntu 18.04 中安装 python3-pip 时未满足的依赖关系
lokesh@lokesh-pc:~$ python3 --version
Python 3.6.5
lokesh@lokesh-pc:~$ pip3 --version
bash: pip3: command not found
lokesh@lokesh-pc:~$ sudo apt-get install python3-pip
[sudo] password for lokesh: 
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:
 python3-pip : Depends: python-pip-whl (= 9.0.1-2) but 9.0.1-2.3 is to be installed
               Recommends: python3-dev (>= 3.2) but it is not going to be installed
               Recommends: python3-wheel but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

答案1

  1. 确保从 sources.lst 中删除所有非默认源
  2. 检查并删除所有之前安装但可能留下一些软件包的软件
  3. apt 更新
  4. 安装

相关内容