can not import name 'main' [install and update pip3]

0

After installing pip3 update it with sudo apt-get install python3-pip and pip3 install --upgrade pip , when installing any package or module, in this case 'future' reports me the error:

$ pip3 install future
  Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'

I tried to reinstall pip3 but it gives me the same problem

    
asked by Alejandro Llamazares 23.07.2018 в 01:08
source

1 answer

0

When you update pip you have a version 10 or higher, which no longer accepts pip.main() to install packages.

The solution is to go back to an earlier version and leave time to debian to update to the new pip.

One sure way to make the pip3 work is to invoke it as if it were a module:

$ sudo python3 -m pip install --upgrade pip==9.0.3

For another time, try not to make changes to the system's python installation. The installer pip can install the modules only for the user, without affecting the system at all (eg: option --user ).

    
answered by 23.07.2018 в 01:56