
Recientemente intenté instalar paquetes con pip y mientras escribía mi comando pip install... y presionaba Enter, no sucede nada, el proceso parece detenido o ejecutándose en bucles. No hay entrada y cierro mi terminal.
Mientras tanto actualicé Python. Sospecho que pude haber hecho algo incorrecto, pero como novato en la Terminal, no estoy seguro de qué pudo haber salido mal.
Pensé que debería intentar reinstalar pip, pero aparece el error que se indica a continuación.
¿Alguna idea de dónde investigar?
$ sudo apt-get install python-pip
[sudo] password for benoit:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-pip is already the newest version (8.1.1-2ubuntu0.4).
The following packages were automatically installed and are no longer required:
libgles1-mesa linux-headers-4.8.0-36 linux-headers-4.8.0-36-generic
linux-headers-4.8.0-39 linux-headers-4.8.0-39-generic linux-headers-4.8.0-41
linux-headers-4.8.0-41-generic linux-headers-4.8.0-45
linux-headers-4.8.0-45-generic linux-headers-4.8.0-46
linux-headers-4.8.0-46-generic linux-headers-4.8.0-49
linux-headers-4.8.0-49-generic linux-image-4.8.0-36-generic
linux-image-4.8.0-39-generic linux-image-4.8.0-41-generic
linux-image-4.8.0-45-generic linux-image-4.8.0-46-generic
linux-image-4.8.0-49-generic linux-image-extra-4.8.0-36-generic
linux-image-extra-4.8.0-39-generic linux-image-extra-4.8.0-41-generic
linux-image-extra-4.8.0-45-generic linux-image-extra-4.8.0-46-generic
linux-image-extra-4.8.0-49-generic snap-confine
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
python3-update-manager update-manager
The following packages will be upgraded:
python3-update-manager update-manager
2 upgraded, 0 newly installed, 0 to remove and 61 not upgraded.
48 not fully installed or removed.
Need to get 0 B/575 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 420706 files and directories currently installed.)
Preparing to unpack .../python3-update-manager_1%3a16.04.6_all.deb ...
File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see python.org/dev/peps/pep-0263/ for details
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see python.org/dev/peps/pep-0263/ for details
dpkg: error processing archive /var/cache/apt/archives/python3-update-manager_1%3a16.04.6_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
File "/usr/bin/py3compile", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3compile on line 4, but no encoding declared; see python.org/dev/peps/pep-0263/ for details
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to unpack .../update-manager_1%3a16.04.6_all.deb ...
File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see python.org/dev/peps/pep-0263/ for details
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see python.org/dev/peps/pep-0263/ for details
dpkg: error processing archive /var/cache/apt/archives/update-manager_1%3a16.04.6_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
File "/usr/bin/py3compile", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3compile on line 4, but no encoding declared; see python.org/dev/peps/pep-0263/ for details
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/python3-update-manager_1%3a16.04.6_all.deb
/var/cache/apt/archives/update-manager_1%3a16.04.6_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Esto es lo que obtengo con
/$ sudo apt-get update
Hit:1 archive.canonical.com/ubuntu xenial InRelease
Get:2 ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease [17,5 kB]
Hit:3 ca.archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 ca.archive.ubuntu.com/ubuntu xenial-security InRelease
Hit:5 ppa.launchpad.net/teejee2008/ppa/ubuntu xenial InRelease
Ign:6 repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Hit:7 repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release
Ign:8 dl.google.com/linux/chrome/deb stable InRelease
Ign:9 dl.google.com/linux/earth/deb stable InRelease
Ign:10 dl.google.com/linux/talkplugin/deb stable InRelease
Ign:2 ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease
Hit:11 dl.google.com/linux/chrome/deb stable Release
Hit:12 dl.google.com/linux/earth/deb stable Release
Hit:15 dl.google.com/linux/talkplugin/deb stable Release
Fetched 17,5 kB in 0s (29,9 kB/s)
Reading package lists... Done
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
...
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
Recibo el error mencionado anteriormente aunque volví a generar fuentes.list, esto es lo que es ahora:
Respuesta1
Existe otra forma sencilla de instalar pip utilizando Curl y Python.
sudo apt-get update
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
Ahora verifique la instalación del pip: escriba el pip en la terminal. Puedes ver algunos códigos.
Si desea comprobar la versión de
pip -V