Caution: Upgrading the system pip can cause problems.
If not in a virtual environment, use python3 -m pip
for the commands.
This ensures that you upgrade and use the Python pip instead of the system pip.
If you got this error.. pip ImportError: cannot import name 'main' after update
- Uninstall
$ python -m pip uninstall pip
- Clear the cache
$ hash -r