在Centos 6.5上安装Python 3.4.2之后没有pip二进制文件 [英] No pip binary after installing Python 3.4.2 on Centos 6.5

查看:211
本文介绍了在Centos 6.5上安装Python 3.4.2之后没有pip二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

成功安装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__

我如何使用它?

解决方案

来自 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版本. /p>

另请参见 https://docs.python.org/3/whatsnew/3.4. html http://bugs.python.org/issue20139

After successful installation of Python I can't find the pip executable. The contents of the /usr/local/lib/python3.4/site-packages/pip are:

-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__

How can I use it?

解决方案

From https://docs.python.org/3.4/installing/index.html

pip is the preferred installer program. Starting with Python 3.4, it is included by default with the Python binary installers.

Before python 3.4, pip was a 'seperate package' and was just called 'pip'.
Because they have now included it with the python installer, and other versions of pip might have been previously installed on the system, the new pip that comes with python 3.4 was named pip3.4 to be able to easily distinguish between different pip versions.

Also see https://docs.python.org/3/whatsnew/3.4.html and http://bugs.python.org/issue20139

这篇关于在Centos 6.5上安装Python 3.4.2之后没有pip二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆