Chapter 2. Installation
You can install Python, in both classic (CPython) and JVM (Jython) versions, on most platforms. With a suitable development system (C for CPython, Java for Jython), you can install Python from its source code distribution. On popular platforms, you also have the alternative of installing from a prebuilt binary distribution.
Installing CPython from a binary distribution is faster, saves you substantial work on some platforms, and is the only possibility if you have no suitable C development system. Installing from a source code distribution gives you more control and flexibility, and is the only possibility if you can’t find a suitable prebuilt binary distribution for your platform. Even if you install from binaries, I recommend you also download the source distribution, which includes examples and demos that may be missing from prebuilt binary packages.
Installing Python from Source Code
To
install Python from source code, you need a platform with an
ISO-compliant C compiler and ancillary tools such as
make
. On Windows, the normal way to build Python
is with the Microsoft product Visual C++.
To download Python source code, visit http://www.python.org and follow the link labeled Download. The latest version at the time of this writing is:
http://www.python.org/ftp/python/2.2.2/Python-2.2.2.tgz |
The .tgz
file extension is equivalent to
.tar.gz
(i.e., a tar
archive of files, compressed by the powerful and popular
gzip
compressor).
Windows
On Windows, ...
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.