Skip to content

Instantly share code, notes, and snippets.

@qin-yu
Last active January 19, 2020 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qin-yu/2b8fe4ad962e7da484716a627cf971df to your computer and use it in GitHub Desktop.
Save qin-yu/2b8fe4ad962e7da484716a627cf971df to your computer and use it in GitHub Desktop.
When pip3 gives errors on "No module named 'pip._internal'"

How to fix No module named 'pip._internal'

$ pip3

Traceback (most recent call last):
File "/home/qinyu/.local/bin/pip3", line 7, in <module>
   from pip._internal import main
ModuleNotFoundError: No module named 'pip._internal'

This doesn't work:

$ sudo apt-get --reinstall install python3

This works: Get a file from here, then

$ sudo python3 get-pip.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment