
Estou tentando instalar o python-pip em um contêiner docker centos7, mas acho que pode estar faltando algum pacote ou algo assim.
[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
O que preciso executar antes yum -y install python-pip
para que ele seja instalado corretamente. Observe que easy_install
também está quebrado, então isso não é uma opção.
Responder1
Você tem que habilitar o repositório EPEL, use:
yum --enablerepo=extras install epel-release
Este comando instalará o repositório EPEL correto para a versão do CentOS que você está executando.
Depois disso, você poderá instalar o python-pip.
Responder2
Eu estava ficando louco com o mesmo problema. A razão pela qual o yum não conseguiu encontrar o python-pip foi que ele não é mais chamado de python-pip. A partir do EPEL versão 7, ele foi renomeado para identificar a versão python. Na minha máquina centOS posso encontrar agora os seguintes pacotes 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.
Responder3
A imagem CentOS Docker não inclui o repositório EPEL por padrão, como faz uma instalação normal do CentOS. Você deveria yum install epel-release
primeiro - depois disso, yum install python-pip
deveria funcionar.
Responder4
Se você receber o mesmo erro mesmo depois de instalar o repositório epel, tente:
sudo yum install -y --enablerepo="epel" python-pip