0

Mac OS: when I try to run anything involving pip, I get

-bash: pip: command not found 

This happened after I accidentally deleted the pip Unix file in usr/local/bin while trying to solve a different problem with pip. At this point, I've pretty much given up on solving the problem manually.

Is there a way to just completely uninstall python and pip and start all over again?

3
  • Did you originally install python and pip with brew? If so you should be able to uninstall and reinstall. Commented Apr 15, 2020 at 17:42
  • superuser.com/questions/324980/… This might be helpful Commented Apr 15, 2020 at 17:42
  • I already tried "brew reinstall" but it didn't bring the file back Commented Apr 15, 2020 at 17:48

2 Answers 2

1

In recent python versions pip is as module rather than as individual script. Try:

python -m pip 
Sign up to request clarification or add additional context in comments.

3 Comments

I get "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named pip"
"In recent python versions pip is as module rather than as individual script." It always was both a package and a script to import function main from the package and call it.
@steinchen This is a very old python version. I checked on my system (apparently very simliar) and indeed it does not include pip. I would recommend to install a recent version of python, preferably 3.7. It does not interfer with the system python.
0

solution was surprisingly simple: deleted everything python related from my computer:

  1. deleted Python App in Applications Folder
  2. deleted all python and pip related files in usr/local/bin
  3. deleted the Python.framework folder in Libraray/Frameworks
  4. searched for and deleted all folders named python

Then I reinstalled Python via the official python page. Pip seems to work now.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.