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

查看:30
本文介绍了如何在 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.这很奇怪,因为 pip 应该默认包含在 Python 3.4 中.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天全站免登陆