• Register
0 votes


Why I got the error : 

modulenotfounderror: no module named 'pip._internal'

How to fix this erro:

modulenotfounderror: no module named 'pip._internal'

HELP! I need help understanding this error: 

modulenotfounderror: no module named 'pip._internal'

Any ideas on what I need to do to fix this? Thanks!

13k points

Please log in or register to answer this question.

1 Answer

0 votes


For completeness, I simply encountered this trouble with "Ubuntu latest" ... v18.04 ... and glued it on this way:

python3 -m pip set up --improve pip

(Notice that it become vital to specify python3 considering the fact that this references Python 3.6.9. The python command at the identical gadget references Python 2.7.17. Since that is seemingly a gadget-extensive set up it encountered a ["not sudo" ...] permission error, however it failed to count as it become the incorrect issue to do anyway. I become encountering the trouble with pip3.)

Are you the usage of python2 or python3 then  The following instructions can be different!


  1. run python3 -m pip --version to peer when you have pip installed.
  2. if yes, run python3 -m pip set up --improve pip.
  3. if no, run sudo apt-get set up python3-pip, and do it again.I've visible this trouble when PYTHONPATH become set to consist of the built-in site-packages directory. Since Python appears there routinely it's miles needless and may be removed.

    I simply encountered the identical trouble and in my case, it seems that is a war among the python set up in my virtualenv and the site-extensive python (Ubuntu). What solves it for me is to run pip on this way, to pressure utilization of the perfect python set up (in my vortualenv):

    python3 -m pip set up PACKAGE

    alternatively of

    pip3 set up PACKAGE

    I realised this once I attempted to observe a number of the solutions right here that advise re-putting in pip and the mistake output I were given become pointing to an present site-extensive python library route even though I had activated my virtualenv. Worth attempting earlier than deleting and re-putting in stuff.

24.2k points