【问题标题】:No pip binary after installing Python 3.4.2 on Centos 6.5在 Centos 6.5 上安装 Python 3.4.2 后没有 pip 二进制文件
【发布时间】:2014-12-21 22:54:06
【问题描述】:

成功安装 Python 后,我找不到 pip 可执行文件。 /usr/local/lib/python3.4/site-packages/pip的内容是:

-rw-r--r--. 1 root root  9450 Oct 26 10:29 __init__.py
-rw-r--r--. 1 root root   116 Oct 26 10:29 __main__.py
-rw-r--r--. 1 root root  9507 Oct 26 10:29 cmdoptions.py
-rw-r--r--. 1 root root  8162 Oct 26 10:29 baseparser.py
-rw-r--r--. 1 root root  6578 Oct 26 10:29 basecommand.py
-rw-r--r--. 1 root root  2969 Oct 26 10:29 pep425tags.py
-rw-r--r--. 1 root root  9455 Oct 26 10:29 log.py
-rw-r--r--. 1 root root  6202 Oct 26 10:29 locations.py
-rw-r--r--. 1 root root 40403 Oct 26 10:29 index.py
-rw-r--r--. 1 root root  1086 Oct 26 10:29 exceptions.py
-rw-r--r--. 1 root root 22580 Oct 26 10:29 download.py
-rw-r--r--. 1 root root 24172 Oct 26 10:29 util.py
-rw-r--r--. 1 root root   116 Oct 26 10:29 status_codes.py
-rw-r--r--. 1 root root   431 Oct 26 10:29 runner.py
-rw-r--r--. 1 root root 83557 Oct 26 10:29 req.py
-rw-r--r--. 1 root root 20618 Oct 26 10:29 wheel.py
drwxr-xr-x. 3 root root  4096 Oct 26 10:29 vcs
drwxr-xr-x. 3 root root  4096 Oct 26 10:29 commands
drwxr-xr-x. 8 root root  4096 Oct 26 10:29 _vendor
drwxr-xr-x. 3 root root  4096 Oct 26 10:29 backwardcompat
drwxr-xr-x. 2 root root  4096 Oct 26 10:29 __pycache__

我该如何使用它?

【问题讨论】:

  • 它应该在 /usr/bin/ 中。您可以在任何地方直接使用它。试试pip freeze
  • @ChillarAnand 我已经检查过了: [andrzej@localhost pip]$ which pip /usr/bin/which: no pip in (/usr/local/bin:/usr/bin:/ bin:/usr/local/sbin:/usr/sbin:/sbin:/home/andrzej/bin)
  • pip freeze 是否正常工作。试试whereis pip
  • 好的,现在叫做'pip3.4' 谢谢你的帮助! :)
  • [andrzej@localhost pip]$ whereis pip pip: /usr/local/bin/pip3.4

标签: python pip python-3.4 centos6.5


【解决方案1】:

来自https://docs.python.org/3.4/installing/index.html

pip 是首选的安装程序。从 Python 3.4 开始,它 默认情况下包含在 Python 二进制安装程序中。

在 python 3.4 之前,pip 是一个“单独的包”,只是被称为“pip”。
因为他们现在已经将它包含在python安装程序中,并且系统上可能之前已经安装了其他版本的pip,所以python 3.4附带的新pip被命名为pip3.4,以便能够轻松区分不同的pip版本。

另见https://docs.python.org/3/whatsnew/3.4.htmlhttp://bugs.python.org/issue20139

【讨论】:

    猜你喜欢
    • 2014-06-25
    • 2016-09-17
    • 2016-08-05
    • 2016-08-20
    • 2014-10-27
    • 2015-05-11
    • 1970-01-01
    • 1970-01-01
    • 2017-07-09
    相关资源
    最近更新 更多