Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm doing a clean-out and refresh of my programming environment and since all the coding I do is in Python 3, I'm wondering if the easiest and cleanest option is to just completely remove Python 2 from my machine.

My main question is: Does OS X have any Python 2 dependencies, or will removing the entire Python 2 system from my machine hurt it somehow?

Thanks in advance.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I'm wondering if the easiest and cleanest option is to just completely remove Python 2 from my machine.

Don't go there. Please don't remove system binaries such as Python or Ruby. They come installed in /System/Library/Frameworks and I wouldn't be surprised if your system malfunctioned in some way after forcefully removing things from there at will.

It's anything but "clean" to delete something your system shipped (and was designed to work) with. This is especially important because Python 3 is not backwards compatible to Python 2, IIRC.

If you want to install newer versions of Python, there are other ways to go about it. One would be to use the Python installer, which adds the new version to the Frameworks, and provides you with python3.

The other would be to use a package manager such as Homebrew. After installing that, you can run brew install python3, which will install to /usr/local/ instead of overwriting any system binaries. You'll also get a python3 binary.

If you want to work with python3 instead of Python 2's python, simply add this alias to your ~/.bash_profile:

alias python='python3'
share|improve this answer
    
Consider me scared straight. Thanks for the advice! –  Stephen Malone Jan 4 '13 at 22:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.