Ale*_*hen 27 python pip centos-7
我正在尝试在 centos7 docker 容器中安装 python-pip,但我想我可能缺少一些包或其他东西。
[root@aasdfasdfa /]# yum -y install python-pip
Loaded plugins: fastestmirror, ovl
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
updates/7/x86_64/primary_db | 8.4 MB 00:00:31
Loading mirror speeds from cached hostfile
* base: repos.lax.quadranet.com
* extras: mirrors.unifiedlayer.com
* updates: mirrors.usc.edu
No package python-pip available.
Error: Nothing to do
Run Code Online (Sandbox Code Playgroud)
我需要先运行什么才能yum -y install python-pip
正确安装。请注意,这easy_install
也已损坏,因此这不是一种选择。
Zin*_*ina 47
您必须启用 EPEL 存储库,使用:
yum --enablerepo=extras install epel-release
此命令将为您正在运行的 CentOS 版本安装正确的 EPEL 存储库。
在此之后,您将能够安装 python-pip。
小智 9
我对同样的问题发疯了。yum 找不到 python-pip 的原因是它不再被称为 python-pip。从 EPEL 版本 7 开始,它被重命名以识别 python 版本。在我的 centOS 机器上,我现在可以找到以下 python*-pip 包。
[root@asdasdasdasdsa ~]# yum info python*-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.rz.uni-frankfurt.de
* epel: mirrors.mit.edu
* extras: mirror.23media.de
* updates: ftp.plusline.de
Available Packages
Name : python2-pip
Arch : noarch
Version : 8.1.2
Release : 5.el7
Size : 1.7 M
Repo : epel/x86_64
Summary : A tool for installing and managing Python 2 packages
URL : http://www.pip-installer.org
License : MIT
Description : Pip is a replacement for `easy_install
: <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
: same techniques for finding packages, so packages that were made
: easy_installable should be pip-installable as well.
Name : python34-pip
Arch : noarch
Version : 8.1.2
Release : 5.el7
Size : 1.7 M
Repo : epel/x86_64
Summary : A tool for installing and managing Python3 packages
URL : http://www.pip-installer.org
License : MIT
Description : Pip is a replacement for `easy_install
: <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
: same techniques for finding packages, so packages that were made
: easy_installable should be pip-installable as well.
Run Code Online (Sandbox Code Playgroud)
CentOS Docker 映像默认不包含 EPEL 存储库,就像常规的 CentOS 安装那样。你应该yum install epel-release
首先 - 之后,yum install python-pip
应该工作。
归档时间: |
|
查看次数: |
68869 次 |
最近记录: |