Python OS X 10.5开发环境 [英] Python OS X 10.5 development environment

查看:101
本文介绍了Python OS X 10.5开发环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想尝试一下Google App Engine Python环境,这些文档会运行2.5.2。当我使用OS X Leopard时,我安装了Python 2.5.1,但希望安装最新的2.5.x版本(不是2.6或3.0)。看来最新版本是 2.5.4



所以,我去了这里:

http://wiki.python.org/moin/MacPython/Leopard



并停止,因为我担心安装最新版本可能会混淆标准安装。我真的只想安装一个版本。



所以我的问题是如何安全地安装最新的2.5.x?是否有可能完全取代内置版本,如果是这样会伤害任何Mac工具?



干杯,
Shane

$ b $您可以在Mac上安装python,它不会混淆默认安装。不过,我强烈建议您使用 MacPorts 来安装Python,因为这会让您更容易安装Python库和包更进一步。此外,如果您尝试使用依赖于Python的MacPorts安装程序或库,MacPorts将下载Python的副本,即使您安装了MacPython,如果您安装了MacPython,但如果您选择安装MacPython,则可能会得到多余的Python副本在以后使用MacPorts。与MacPorts的,下载安装Python和安装的MacPorts,然后键入:

 
须藤端口安装python25 python_select
须藤python_select python25

运行以下命令查看Python的所有MacPorts包:

 
端口列表| grep py25-

只需输入以下内容即可在列表中安装任何软件包:

 
sudo port install packagename

在上面, i> packagename 与软件包名称。在我第一次安装时,我总是运行

 
sudo port install py25-setuptools

[注意:这些命令需要从终端 - 应用程序>实用程序> Terminal.app]运行。


I would like to try out the Google App Engine Python environment, which the docs say runs 2.5.2. As I use OS X Leopard, I have Python 2.5.1 installed, but would like the latest 2.5.x version installed (not 2.6 or 3.0). It seems the latest version is 2.5.4

So, I went to here:

http://wiki.python.org/moin/MacPython/Leopard

and stopped because I am worried installing the latest version might mess with the standard install. I really just want one version installed.

So my questions are how do I safely install the latest 2.5.x? Is it possible to fully replace the built in version, and if so would that hurt any Mac tools?

Cheers, Shane

解决方案

You can install python on your Mac, and it won't mess with the default installation. However, I strongly recommend that you use MacPorts to install Python, since that will make it much easier for you to install Python libraries and packages further down the road. Additionally, if you try to install a program or library with MacPorts that depends on Python, MacPorts will download a copy of Python, even if you have MacPython installed, so you might end up with redundant copies of Python if you install MacPython but then choose to use MacPorts at a later date. To install Python with MacPorts, download and install MacPorts, then type:

sudo port install python25 python_select
sudo python_select python25

Run the following command to view all the MacPorts packages for Python:

port list | grep py25-

You can install any of the packages on the list by simply typing:

sudo port install packagename

In the above, replace packagename with the name of the package. On my first install I always run

sudo port install py25-setuptools

[ NOTE: These commands need to be run from the Terminal -- Applications > Utilities > Terminal.app ]

这篇关于Python OS X 10.5开发环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆