简体   繁体   English

如何在雪豹上安装多个python版本?

[英]how to install multiple python versions on snow leopard?

whats is the current best practice for installing multiple versions of python on snow leopard? 什么是目前在雪豹上安装多个版本的python的最佳实践?

  • have setup python 2.7.1 via Homebrew, very easy process, all great. 通过Homebrew设置python 2.7.1,非常简单的过程,一切都很棒。
  • but now I need to setup python 2.5 to develop an appengine project.. Initially created a new virtualenv against system python2.5 .. but finding I have all kinds of PATH issues. 但现在我需要设置python 2.5来开发一个appengine项目。最初创建了一个针对系统python2.5的新virtualenv ..但发现我有各种PATH问题。 Seems at this point it would be better not to use Homebrew and go with a more standard setup? 在这一点似乎最好不要使用Homebrew并采用更标准的设置?

any thoughts ? 有什么想法吗 ?

Snow leopard already contains python 2.5 and python 2.6, no issues there. 雪豹已经包含python 2.5和python 2.6,没有问题。

If you require obscure modifications to the python installations, just compile your own, and put it in some place where it won't conflict with the system python. 如果你需要对python安装进行模糊的修改,只需编译自己的,并将它放在一个不会与系统python冲突的地方。 (I suggest /opt/your-pythonx.y). (我建议/opt/your-pythonx.y)。

As an aside, check: "man python" on mac to see how to use the 32-bit, or 64-bit options if that turns out to be neccessary. 顺便说一句,检查:mac上的“man python”,看看如何使用32位或64位选项,如果结果是必要的话。 (Sometimes it is for c modules) (有时是c模块)

I use the python_select utility to switch between versions (it takes care of all the paths and links). 我使用python_select实用程序在版本之间切换(它负责所有路径和链接)。 It's easy to install with MacPorts or fink, so I would guess you can install the same utility with Homebrew. 使用MacPorts或fink很容易安装,所以我猜你可以用Homebrew安装相同的实用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM