I've been having a lot of trouble with python and pip, I think both got corrupted or something. I'm new to all this. I'm using a Macbook pro running Monterey and I was curious how to delete python and pip so I can re-install them. Any ideas are greatly appreciated. I have it all installed in the terminal, no applications I think.
CodePudding user response:
If you installed the earlier version of Python, you can take this method to uninstall it from your Mac. First open the Terminal, and input the following command lines:
sudo rm -rf “/Applications/Python”
sudo rm -rf /Library/Frameworks/Python.framework
sudo rm -rf /usr/local/bin/python
In order to delete pip you can use the following command
sudo python -m pip uninstall pip
or
sudo apt-get --purge autoremove python3-pip
I hope that my answer will be useful.
CodePudding user response:
Since you're using mac you can type into terminal the following command to get the path of python and pip:
Python:
python -c "import sys; print(sys.executable)"
Pip:
which pip
Just use rm -r
followed by the path you got