
Estoy intentando instalar python-pip en un contenedor acoplable centos7, pero creo que me falta algún paquete o algo así.
[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
¿Qué necesito ejecutar antes yum -y install python-pip
para que se instale correctamente? Tenga en cuenta que easy_install
también está roto, por lo que no es una opción.
Respuesta1
Tienes que habilitar el repositorio EPEL, usa:
yum --enablerepo=extras install epel-release
Este comando instalará el repositorio EPEL correcto para la versión de CentOS que está ejecutando.
Después de esto podrás instalar python-pip.
Respuesta2
Me estaba volviendo loco por el mismo tema. La razón por la que yum no pudo encontrar python-pip fue porque ya no se llama python-pip. A partir de EPEL versión 7, se le cambia el nombre para identificar la versión de Python. En mi máquina centOS ahora puedo encontrar los siguientes paquetes 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.
Respuesta3
La imagen de CentOS Docker no incluye el repositorio EPEL de forma predeterminada, como lo hace una instalación normal de CentOS. Primero deberías yum install epel-release
... después de eso, yum install python-pip
debería funcionar.
Respuesta4
Si recibe el mismo error incluso después de instalar el repositorio de epel, intente:
sudo yum install -y --enablerepo="epel" python-pip