【问题标题】:pip3 in ubuntu 14.04 alongside pip for 2.7ubuntu 14.04 中的 pip3 和 2.7 的 pip
【发布时间】:2017-07-07 19:21:27
【问题描述】:

我想为我的 python3 环境安装 pip3,但我发现它无法被系统识别,尽管已安装。

$ sudo apt-get install python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pip is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.

好的,应该安装了:

$ pip3
The program 'pip3' is currently not installed. You can install it by typing:
sudo apt-get install python3-pip

但是,但是,我就是这么做的!

这是我的蟒蛇:

$ python -V
Python 2.7.6

$ python3 -V
Python 3.4.3

发生了什么事?无法判断这是 pip 还是 apt-get 问题。我的 .bashrc 和类似文件也清除了任何会以不寻常方式别名 pip3 的内容。

【问题讨论】:

  • 尝试关闭并重新打开终端,然后再次检查。
  • 同样的结果,不幸的是!
  • 从这篇文章中尝试手动方式:stackoverflow.com/questions/6587507/…
  • 所需的最小诊断:which python python3 pip pip3。您也可以尝试使用 pip3 的其他方法:python3 -m pip

标签: python-2.7 python-3.x pip ubuntu-14.04


【解决方案1】:

确保在 $PATH 中指定的目录之一中找到 pip3。 在我的机器上:

$ which pip3 /usr/bin/pip3

【讨论】:

    猜你喜欢
    • 2019-03-28
    • 2023-03-24
    • 1970-01-01
    • 2014-10-29
    • 1970-01-01
    • 2018-05-02
    • 2019-07-17
    • 2017-05-09
    相关资源
    最近更新 更多