Reputation: 21
When I use pip3 I get this error:
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/usr/bin/pip3", line 7, in <module>
from pip import main
ModuleNotFoundError: No module named 'pip'
I tried to reinstall PIP but still reported this error, but I use python3 -m ensurepip
It told me to install Xcode command line
$ python3 -m ensurepip
$ xcode-select: Failed to locate 'python3.9', requesting installation of command line developer tools.
Upvotes: 1
Views: 1314
Reputation: 76
I had this problem when I was trying to update the pip and it failed. This always works for me:
python get-pip.py
font: https://pip.pypa.io/en/stable/installation/
Upvotes: 1