1

有没有一种简单的方法可以在 OS X 机器上同时运行 Python 2.7 和 3.2?我一直在将 IDLE 与 Python 3.2 一起使用,并且有许多使用 Python 3 编写的程序,所以我真的不想卸载 3。但是,我正在处理一个使用 2.7 的任务,它的很多基本代码都使用了,所以我'希望能够运行2.7。

4

1 回答 1

3

OS X 10.7 和 10.8 预装了 Python 2.7;/usr/bin/python

$ /usr/bin/python2.7
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

但是,不禁止安装其他版本的 python。Python for Mac 2.7.3安装程序不会干扰系统安装Python 3 安装。

于 2012-09-24T20:13:03.200 回答