How to Uninstall Pip on Osx

How to uninstall pip on OSX?

The first thing you should try is:

sudo pip uninstall pip

On many environments that doesn't work. So given the lack of info on that problem, I ended up removing pip manually from /usr/local/bin.

unable to uninstall pip macOS Big Sur 11.2.3

Go to the location /usr/local/bin and delete following files:

  • pip
  • pip2
  • pip2.7
  • Any other file with a prefix pip.

If you get permission error for any file e.g. pip2, change the permission using root user as chmod +x pip2.

Now, go to /Library/Python/2.7/site-packages/ and delete all packages with prefix pip. Also delete from Library/Python/3/, if you've installed in python3 too.

How do I delete pip and python

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.

Macos uninstall pip and start over

Can you try removing pip using this in the directory where pip pacakge is installed?
sudo rm -r pip <Version Number>

You can get the directory where pip is installed with this: which pip and then cd into that path and run the above command.

How to uninstall Pip and Tensorflow properly in my case

First of all, by running pip3 install --upgrade pip command you will upgrade pip3 not pip.

For removing pip from the system, You can try sudo apt-get remove python-pip or pip uninstall pip.



Related Topics



Leave a reply



Submit