Contentop
Contentop

Reputation: 1261

How to remove python 3.7.3 from Mac?

I have Python 3.7.3 on my mac which I would like to remove. The guides say to move the python app to trash from applications but it is not even there. The guides also say to remove it from the Library folder. going into frameworks/Python.Framework but I can not see the folder. Also, When I am using the terminal for this sequence:

a-MacBook-Pro:~ a$ which python3
/usr/local/bin/python3
a-MacBook-Pro:~ a$ ls -l /usr/local/bin/python3
lrwxr-xr-x  1 a  admin  34 Jun  2 17:34 /usr/local/bin/python3 -> ../Cellar/python/3.7.3/bin/python3

which makes me understand that the file is in the Cellar folder and not Library?

How can I remove it so that when I write python3 --version I am notified that not python3 is installed?

Upvotes: 1

Views: 20623

Answers (3)

Kaushik k
Kaushik k

Reputation: 157

If you used homebrew to install Python, you can do this.,

brew uninstall python3

Use this for a specific Python version.,

brew uninstall [email protected]

OR

Alternatively You may uninstall by.,

  1. To remove the framework, enter the following:

    sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.7

  2. Remove the app directory:

    sudo rm -rf "/Applications/Python 3.7"

  3. Ensure that the symbolic links in /usr/local/bin exit with the following command:

    ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/3.7'

Upvotes: 1

ChuongHo
ChuongHo

Reputation: 97

If you are using homebrew, can using command :

brew uninstall python3

In case can't uninstall can use :

rew uninstall --ignore-dependencies python3

Upvotes: -1

Ortomala Lokni
Ortomala Lokni

Reputation: 62683

As you have installed python3 with Homebrew, you can uninstall it with:

 brew uninstall python3

Upvotes: 2

Related Questions