Instalar pip3 (para python3) en ubuntu 16.04 LTS usando un proxy


84

He intentado ingresar:

sudo apt install python3-pip

El error que obtengo es:

$ sudo apt install python3-pip  
Reading package lists... Done 
Building dependency tree        
Reading state information... Done 
The following additional packages will be installed:
    libexpat1-dev libpython3-dev libpython3.5-dev python-pip-whl python3-dev python3-wheel python3.5-dev 
The following NEW packages will be installed:
    libexpat1-dev libpython3-dev libpython3.5-dev python-pip-whl python3-dev python3-pip python3-wheel python3.5-dev 0 to upgrade, 8 to newly install, 0 to remove and 0 not to upgrade. 
Need to get 1,219 kB/39.1 MB of archives. 
After this operation, 56.8 MB of additional disk space will be used. 
Do you want to continue? [Y/n] y 
Ign:1 au.archive.ubuntu.com/ubuntu xenial-updates/universe i386 python-pip-whl all 8.1.1-2ubuntu0.1 
Ign:2 au.archive.ubuntu.com/ubuntu xenial-updates/universe i386 python3-pip all 8.1.1-2ubuntu0.1 
Err:1 au.archive.ubuntu.com/ubuntu xenial-updates/universe i386 python-pip-whl all 8.1.1-2ubuntu0.1
    404  Not Found 
Err:2 au.archive.ubuntu.com/ubuntu xenial-updates/universe i386 python3-pip all 8.1.1-2ubuntu0.1
    404  Not Found
E: Failed to fetch http://au.archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip-whl_8.1.1-2ubuntu0.1_all.deb 
    404  Not Found
E: Failed to fetch http://au.archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python3-pip_8.1.1-2ubuntu0.1_all.deb
    404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Creo que hemos omitido el proxy, por lo que no estoy seguro de por qué obtengo el "archivo 404 no encontrado".


3
Inténtalo de nuevo corriendosudo apt-get update
muru

Funciona bien desde casa, pero tengo máquinas Linux en la escuela en la que enseño, que tienen un proxy que pensé que habíamos omitido para ubuntu.com, pero parece que de alguna manera no lo he hecho ...
Abisdad

1
Entonces, esto no tiene nada que ver con Ubuntu, sino la configuración de su red.
David Foerster

Respuestas:


140

El primer procedimiento que siguió es correcto.

sudo apt-get -y install python3-pip

Pero antes de instalar intente actualizar usando el comando

sudo apt-get update

Si primero no funcionó, entonces también puede hacerlo usando curl

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python3 get-pip.py --user

Luego, para verificar la instalación, intente

pip3 --help 

Para verificar la versión:

pip3 --version 

2
¡Gracias! Pero necesitaba: "pip3 --help"
Abisdad

1
curl -sS https://bootstrap.pypa.io/get-pip.py | sudo python
PvdL

¡Interesante! ¿Por qué necesita 'sudo apt-get update' para instalar pip3? me parece bastante inesperado
Charlie Parker

Esto no funciona para pip3, instala el script pip2 que python3 no puede ejecutar.
rjurney

8
curl -sS https://bootstrap.pypa.io/get-pip.py | sudo python3para Python 3;)
mbdevpl

2

Solucioné ese problema cambiando el Servidor en "Software y actualizaciones" -> Descargar desde: allí elegí una dirección diferente y 404 desapareció.


1
¿Qué dirección elegiste? agregue más detalles
TiloBunt

0

que funciono para mi

curl -sS https://bootstrap.pypa.io/get-pip.py >>setup.py
python3 setup.py
Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.