Problema na instalação do pip no Ubuntu 16.04⠀

Problema na instalação do pip no Ubuntu 16.04⠀

Problema na instalação do pip no Ubuntu 16.04. Ele foi instalado corretamente, eu acho, mas quando verifiquei pip -V, ele mostra este erro:

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

Responder1

Tente limpar e instalar o pip novamente. posso ver que os arquivos que não foram baixados do repositório estão sendo instalados usando o cache do temporário que já foi baixado. estou sugerindo fazer uma instalação limpa que pode ajudar. primeiro limpe o pip e faça uma limpeza automática e remoção automática no apt e tente instalar novamente.

Responder2

Você pode tentar:

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

informação relacionada