Problema al instalar pip en Ubuntu 16.04⠀

Problema al instalar pip en Ubuntu 16.04⠀

Problema al instalar pip en Ubuntu 16.04. Supongo que se instaló correctamente, pero cuando revisé pip -Vme muestra este error:

anshul@ANSHUL:~$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  python-pip
0 upgraded, 1 newly installed, 0 to remove and 15 not upgraded.
Need to get 0 B/144 kB of archives.
After this operation, 635 kB of additional disk space will be used.
Selecting previously unselected package python-pip.
(Reading database ... 282702 files and directories currently installed.)
Preparing to unpack .../python-pip_8.1.1-2ubuntu0.4_all.deb ...
Unpacking python-pip (8.1.1-2ubuntu0.4) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up python-pip (8.1.1-2ubuntu0.4) ...
anshul@ANSHUL:~$ pip -V
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main

Respuesta1

Intente purgar e instalar pip nuevamente. Puedo ver que los archivos que no se descargaron del repositorio se están instalando usando el caché temporal que ya está descargado. Sugiero realizar una instalación limpia que podría ayudar. Primero purgue pip y realice una limpieza y eliminación automáticas en el apto y luego intente instalar nuevamente.

Respuesta2

Puedes intentar:

sudo apt-get autoremove 
sudo apt-get update
sudo easy_install pip==20.3.4

información relacionada