如何在CentOS 7中安装pip? [英] How to install pip in CentOS 7?

查看:639
本文介绍了如何在CentOS 7中安装pip?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CentOS 7 EPEL现在包括Python 3.4:yum install python34

CentOS 7 EPEL now includes Python 3.4: yum install python34

但是,当我尝试这样做时,即使Python 3.4安装成功,它似乎也没有安装pip.这很奇怪,因为Python 3.4默认应包含pip. which pip3找不到任何内容,which pip也找不到.

However, when I try that, even though Python 3.4 installs successfully, it doesn't appear to install pip. Which is weird, because pip should be included by default with Python 3.4. which pip3 doesn't find anything, nor does which pip.

如何从CentOS 7 EPEL版本中的Python 3.4软件包访问pip?

How do I access pip from the Python 3.4 package in CentOS 7 EPEL release?

推荐答案

我发现在CentOS 7上安装pip3(适用于python3.x软件包)的最简单方法是:

The easiest way I've found to install pip3 (for python3.x packages) on CentOS 7 is:

$ sudo yum install python34-setuptools
$ sudo easy_install-3.4 pip

当然,您需要事先启用EPEL存储库.

You'll need to have the EPEL repository enabled before hand, of course.

您现在应该能够运行以下命令来为python3.x安装软件包:

You should now be able to run commands like the following to install packages for python3.x:

$ pip3 install foo

这篇关于如何在CentOS 7中安装pip?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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