Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple versions of Python on OS X Leopard

Tags:

I currently have multiple versions of Python installed on my Mac, the one that came with it, a version I downloaded recently from python.org, an older version used to run Zope locally and another version that Appengine is using. It's kind of a mess. Any recommendations of using one version of python to rule them all? How would I go about deleted older versions and linking all of my apps to a single install. Any Mac specific gotchas I should know about? Is this a dumb idea?

like image 612
tomvon Avatar asked Aug 02 '09 13:08

tomvon


People also ask

Can I have multiple versions of Python installed on Mac?

Pyenv is a program that's used for Python version management on macOS and Linux. It can install multiple Python versions, specify the version that's used system-wide, and specify the version that's used in specific directories. It can also create and manage virtual environments using specific versions.

Can I have multiple versions of Python installed?

Switch between different versions 10. You can repeat the above steps and install different versions of python as you want and set priority and use them as needed. To use these python versions with IDE, go to your IDE's interpreter settings and there you can see the different versions of python available on your system.


1 Answers

There's nothing inherently wrong with having multiple versions of Python around. Sometimes it's a necessity when using applications with version dependencies. Probably the biggest issue is dealing with site-package dependencies which may vary from app to app. Tools like virtualenv can help there. One thing you should not do is attempt to remove the Apple-supplied Python in /System/Library/Frameworks and linked to from /usr/bin/python. (Note the recent discussion of multiple versions here.)

like image 194
Ned Deily Avatar answered Oct 13 '22 22:10

Ned Deily