22

I want to update my Python framework on Mac and delete the old versions but I am not sure if is safe to

rm -fr /Library/Frameworks/Python.framework/Versions/2.4 - 2.5 - 2.6 -3.0 etc. 

Any suggestion?

0

2 Answers 2

32

Yes, it's safe.
The Mac's system python's are in /System/Library/....
.dmg's downloaded and installed from python.org are placed in /Library/....
Don't delete the /System ones, but the /Library ones are user installed, so they should be safe to delete.

Sign up to request clarification or add additional context in comments.

5 Comments

I personally have done this-- I've installed python.org's .dmg's, then removed them and installed from source with homebrew.
To completely delete the old ones, you can also delete the corresponding folders installed by the python.org installers into /Applications, either /Applications/MacPython 2.n or /Applications/Python m.n. The final piece is to delete the corresponding symlinks in /usr/local/bin (not /usr/bin!)
+1 Ned. Agreed. I forgot those steps, but I remember doing them.
It's safer not to mess with /System/Library/Frameworks/Python.framework/
I'm not able to do the above command. I get "Operation not permitted" even when I use sudo. @snapshoe
-1

No, it's not safe. Generally, don't mess with the Python that comes with your OS, many system tools depends on having a specific version of Python.

2 Comments

Yes, you should not mess with Python files that are part of an OS distribution. But the paths referenced by the OP are not to the Pythons that come with OS X, rather they are ones installed by the python.org installer or other third-party installers.
/Library/Frameworks/Python.framework is not the system one

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.