Appendix A. Installation and Configuration

This appendix provides additional installation and configuration details, as a resource for people new to such topics.

Installing the Python Interpreter

Because you need the Python interpreter to run Python scripts, your first step to using Python is usually installing Python. Unless a Python is already available on your machine, you’ll need to fetch, install, and possibly configure a Python on your computer. You only need to do this once per machine, and perhaps not at all, if you will be running a frozen binary.

Where to Get Python

First off, before doing anything, make sure you don’t already have a recent Python on your machine. For instance, if you are working on Linux, or some Unix systems, Python is probably already installed. Type python at a shell prompt and see what happens; alternatively, try searching the usual places (/usr/bin, /usr/local/bin, etc.). On Windows, check if there is a Python entry in the programs menu you find in your Start button, at the bottom left of the screen. Make sure the Python you find is version 2.2 or later; you’ll need that to run some of the examples in this edition.

If there is no Python to be found, you will need to install one yourself. You can always fetch the latest and greatest standard Python release from http://www.python.org, Python’s official web site; look for the Downloads link on that page, and grab a release for the platform you will be working on. There, you’ll find prebuilt Python executables ...

Get Learning Python, 2nd Edition 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.