OS X Leopard上的多个版本的Python [英] Multiple versions of Python on OS X Leopard
问题描述
我目前在Mac上安装了多个版本的Python,一个版本是我最近从python.org下载的版本,一个是用于在本地运行Zope的旧版本,另一个是Appengine正在使用的版本.有点混乱.有什么建议使用一个版本的python来统治它们吗?我将如何处理已删除的旧版本,并将所有应用程序链接到一个安装中.我应该知道任何Mac特定的陷阱吗?这是一个愚蠢的主意吗?
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?
推荐答案
拥有多个版本的Python并没有本质上的错误.有时在使用具有版本依赖性的应用程序时这是必要的.可能最大的问题是处理网站程序包依存关系,这可能因应用程序而异.诸如 virtualenv
之类的工具可以为您提供帮助.您不应该不要做的一件事是尝试从/System/Library/Frameworks中删除Apple提供的Python,并从/usr/bin/python链接到该Python. (请注意,最近对多个版本的讨论
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.)
这篇关于OS X Leopard上的多个版本的Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!