本都已经安装好了 Python——你只需查看一下是哪个版本。尽管其他平台只能找到相对较早的
2.x 对应版本,但是就 1.5 版而言这些版本也有了显著的改进。
一些平台有其对应二进制版本,可以直接安装,另外一些则需要在安装前手工编译。
Unix 衍生系统(Linux,MacOS X,Solaris,FreeBSD 等等)
正如前文所述,基于 Unix 的系统可能已经安装了 Python。最好的检查方法就是通过命令
行运行 Python,查看它是否在搜索路径中而且运行正常。只需输入:
myMac:~ wesley$ python
Python 2.4 (#4, Mar 19 2005, 03:25:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1671)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
">>>"
If starting Python fails, it doesn’t mean it’s not installed, just that it’s
not in your path. Hunt around for it, and if you’re unsuccessful, try building it manu-
ally, which isn’t very difficult (see “Build It Yourself” on the
next page).