0

I have macOS High Sierra and installed Python 3.6 a few days ago. Today I was installing a few packages using pip3, which worked great until I used:

pip3 install --upgrade pip --user

Now when I use pip3 install for any package, I get the following error:

Traceback (most recent call last):
  File "/usr/bin/pip3", line 7, in <module>
    from pip import main
ImportError: cannot import name 'main'

I can’t figure out how to get pip3 working again. I don’t have permissions to use sudo. What can I check for? Is there a way to undo whatever that command did?

EDIT The following line fixed pip for me:

python3 -m pip install --user pip==9.0.1
Insu Q
  • 403
  • 6
  • 13
  • @Ruturaj per my post I can’t use sudo, so I’m looking for another solution – Insu Q Mar 30 '19 at 03:37
  • 1
    I know, there are solutions without sudo, like [this](https://stackoverflow.com/questions/49836676/error-after-upgrading-pip-cannot-import-name-main#answer-50492636). Please try those first. – R4444 Mar 30 '19 at 03:43
  • 1
    @Ruturaj, Claire’s solution fixed it for me. Thanks! "python3 -m pip install --user pip==9.0.1" – Insu Q Apr 01 '19 at 14:03

0 Answers0