see here for setup instructions).
In the tutorials for this Challenge, we will be using Python version 2.7. We will also use IDLE: an Integrated Development Environment, which helps us to write, run, test and debug our codes. By default, IDLE comes with the version of Python we will install. Finally, we need to install some packages. These are "add-ons" for Python, which enhance the core language.
This page describes how to:
on Windows, Mac OS X and Unix/Linux systems.
If you are using a Raspberry Pi, with the Raspbian operating system, then the good news is that Python and IDLE are installed by default, and all you have to do is add the packages. See here for details.
If you are using a school computer, IDLE may already be installed: check with your teacher.
If you have already installed Python, IDLE and the packages numpy, scipy and pygame, you can start the first tutorial.
Python is available to download from the official page. Select Python 2.7.3 Windows Installer. (Please do not choose the 64-bit version, even if you have a 64-bit machine, as it's not fully compatible with certain packages). Save this file, and double-click it to run. Choose the standard options (e.g. "all users"), so that the file is installed under C:\Python27\
Once Python is installed, you should be able to start IDLE via the Start Menu. Go to Start -> All Programs -> Python 2.7 -> IDLE (Python GUI). You should get a new window, entitled "Python Shell". To check that all is working as it should, try typing (at the
Now we need to install three packages. The good news is that many packages are available for Python: there's a long list at pipy.python.org/pypi. The bad news is that installing Python packages in Windows is a bit of a headache! Fortunately, the three packages that we need (
numpy: Go to sourceforge.net/projects/numpy/files/ and download the latest version. This comes in a zip file, which you will need to unzip using (e.g.) WinZip. After unzipping, double-click on the
To test whether the package has been correctly installed, open IDLE and at the prompt (
scipy: Go to sourceforge.net/projects/scipy/files/ and download the latest version. This is an .exe file. Double-click to start the installation process and, once complete, test by entering
pygame: Go to www.pygame.org/download.shtml and choose pygame-1.9.1.win32-py2.7.msi . Double-click to install, use standard options, and test by entering
Python comes pre-installed on Mac OS X, but due to Apple's release cycle, it is most likely an older version. To check, open Terminal.app (i.e. Applications/Utilities/Terminal) and type
If you do not have version 2.7.x installed, then we suggest that you consider installing it now (to avoid incompatibility issues in code examples), as advised here.
From this page, download the relevant version for your operating system (32-bit for Mac OS 10.3 to 10.6, or 64-bit for Mac OS 10.6 and above). Save the .dmg file, double-click to open it, and then select
numpy and scipy: follow the instructions here for installing these packages
pygame: Go to www.pygame.org/download.shtml and choose the newest version (pygame-1.9.1release-python.org-32bit-py2.7-macosx10.3.dmg).
Here's a guide to installing Python 2.7 on Ubuntu.