【问题标题】:Pip not installing in UbuntuPip 未在 Ubuntu 中安装
【发布时间】:2017-06-07 08:30:18
【问题描述】:

我在 Ubuntu 16.04 LTS as-的终端上给出了命令-

 $ sudo apt install python-pip

它给出的错误是:

> Reading package lists... Done Building dependency tree        Reading
> state information... Done You might want to run 'apt-get -f install'
> to correct these: The following packages have unmet dependencies: 
> bcmwl-kernel-source:i386 : Depends: dkms:i386
>                             Depends: linux-libc-dev:i386 but it is not going to be installed
>                             Depends: libc6-dev:i386 but it is not going to be installed
>                             Depends: linux-headers-generic:i386 but it is not going to be installed or
>                                      linux-headers:i386  dkms : Depends: module-init-tools but it is not going to be installed 
> python-pip : Depends: python-pip-whl (= 8.1.1-2ubuntu0.4) but it is
> not going to be installed
>               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: Unmet dependencies. Try 'apt-get -f install' with no
> packages (or specify a solution).

如何安装 pip?请查看以上错误。

【问题讨论】:

标签: python linux ubuntu pip


【解决方案1】:

经过大量搜索后,这对我有用

sudo apt-get install aptitude

然后用这个命令安装 pip3:

sudo aptitude install python3-pip

【讨论】:

    【解决方案2】:

    好的,要获得 pip,您需要安装那些缺少的依赖项。请尝试以下操作:

    sudo apt-get update

    然后

    sudo apt-get upgrade

    下一次尝试:

    sudo apt-get install python-pip

    如果这不起作用,请尝试使用-f

    如需更多帮助,请查看:https://www.liquidweb.com/kb/how-to-install-pip-on-ubuntu-14-04-lts/

    【讨论】:

    • dkms : Depends: module-init-tools 但不会安装这是否意味着我需要安装 dkms?
    • pip 已安装。谢谢:D
    • @ReshuSingh 太棒了!将此作为正确答案!很高兴能帮上忙!
    【解决方案3】:

    运行

    sudo apt -f install
    

    然后重试命令,如果还是不行,我想你需要install/upgrade一些包出错

    【讨论】:

      猜你喜欢
      • 2019-07-01
      • 1970-01-01
      • 2017-11-01
      • 1970-01-01
      • 2022-11-15
      • 2014-11-15
      • 2015-03-18
      • 2019-02-03
      • 2020-12-26
      相关资源
      最近更新 更多