Skip to content

Instantly share code, notes, and snippets.

@vinesmsuic
Created October 26, 2019 15:21
Show Gist options
  • Save vinesmsuic/78822e537a72657111fbbd52c75afdc6 to your computer and use it in GitHub Desktop.
Save vinesmsuic/78822e537a72657111fbbd52c75afdc6 to your computer and use it in GitHub Desktop.
[Fix] pip ImportError: cannot import name 'main' after update

Note

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 unfortunately you accidently upgraded it and crashed...

If you got this error.. pip ImportError: cannot import name 'main' after update

  1. Uninstall
$ python -m pip uninstall pip
  1. Clear the cache
$ hash -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment