0

This isn't a duplicate even though there is another person with the same question, but his was answered and it doesn't work for me... I am getting a very annoying error that randomly started happening. I'm getting:

File "/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3", line 7, in <module>
      from pip._internal import main
ModuleNotFoundError: No module named 'pip._internal'

This error has actually prevented me from doing schoolwork because I'm making an OCR for a full pdf, a pdf that's not text and I need to find something. I've reinstalled pip properly many times, not working, done everything people have told me so far, not working. My pip just seems to be broken, I'm not sure what exactly to do. So I'm asking for your help, and thank you in advance.

Cleve Green
  • 729
  • 5
  • 12

2 Answers2

0

I've had a similar issue a week ago.

I've solved it doing:

/usr/bin/env python -m pip install --user --upgrade pip
/usr/bin/env python -m pip <my_commands>
Samuel GIFFARD
  • 796
  • 6
  • 22
0

I had the same problem today as I wanted to use Pipenv. Somehow my pip got broken. The final solution: Uninstall pip and reinstall it. It worked for me. Just use the both commands provided beneath:

python -m pip uninstall pip
sudo easy_install pip

Don't be afraid as none of your projects will break from doing that, nor will any package be uninstalled.

Here's my original question with my own solution for that (even if it's a slightly different context).

Hope it helps you, too. Have a nice day!

Train
  • 585
  • 1
  • 6
  • 20
  • The problem is my pip is broken, so it won't even allow me to uninstall anything unless I do so manually – Cleve Green May 02 '18 at 16:58
  • I wasn't able to uninstall packages, either. But using the first above provided command, I was able to uninstall it. The `pip uninstall ` didn't work, but `python -m pip uninstall pip` worked. I had the exact same error. Don't know more about it. Just can recommend to you to give it a try. – Train May 02 '18 at 17:02
  • I'm on python3, so I get this error, I changed it up for python3, just didn't work... Could not find a version that satisfies the requirement uninstall (from versions: ) No matching distribution found for uninstall – Cleve Green May 03 '18 at 13:04
  • I’m in Python 3 as well, but I changed the default to python3 (alias python=“python3”). – Train May 03 '18 at 17:07