$ python Python 2.7.10 (default , Jul 15 2017 , 17:16:57) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin Type "help","copyright","credits" or "license" for more information. >>>从上面的运行结果可以看出,该 Mac OS X 系统己经安装了 Python 2.7.10。
如果要检查 Mac OS X 上是否安装了 Python 3,可以在终端窗口中输入“python3” 命令,如果系统提示“command not found”,则表明该系统暂未安装 Python 3。
在 Mac OS X 上安装 Python 3 可以按如下步骤进行。
登录 https://www.python.org/downloads/ 页面,在该页面下方的“Looking for a specific release?”列表中选择 “Python 3.6.x”,可以看到如图 1 所示的下载列表。
图 1 下载 Python 的安装程序



