Install Python on your Workstation or Laptop

Python is free to install. You can install it from the Python web site. Note that we will use Python 3.x, and not the older 2.x releases. because it matches the textbook. See below for an explanation of program release number.

Install Python from the Python web site

  1. From a browser go to: http://www.python.org/
  2. On the left, under Quick Links (3.x.x, the x may change with Python updates) click the Windows Installer link
  3. A popup window appears asking whether you want to save the python-3.x.x.msi file, click Save File
  4. Select a folder on your workstation to save it
  5. Go to that folder, and click on the file (python-3.x.x.msi)
  6. Take the defaults at each step (click Next)
  7. When installation is complete, click Finish

Python will now be among your installed programs:
To start the IDLE IDE, click start --> All Programs >> Python 3.x --> IDLE (Python GUI)

Installation of the Wing IDE 101 Package

The Python package from python.org contains an IDE (IDLE). This IDE works and it is simple to run, but it is prone to crashing. A better IDE is Wing IDE 101. This is a free package specifically for introductory programming classes. Wing IDE 101 is already installed on the lab machines. If you want it for your machine, here are the steps:

  1. Go to http://wingware.com/downloads/wingide-101/ and download the proper package for your operating system. This will be an exe file for Windows.
  2. Double click on the file you downloaded.
  3. Answer the questions the installer asks.
  4. You should finish with Wing IDE installed and in "All Programs" on your machine. You run it as you run any application on a Windows machine.

A video for installing Python and Wing IDE 101 on Mac OS X
A video for installing Python and Wing IDE 101 on a Windows computer

Installation of the Graphics Package

There should be a small file in the Python3.x folder that was created by the Python install called graphics.py. It will be in the folder C:\Python3x\Lib\site-packages (or whatever drive you installed Python on). This file is on all the lab machines already.

If you install Python on your own machine, make sure the graphics.py file is in the path mentioned above. If it is not there, the instructions to get the file are below:

  1. Go to: http://mcsp.wartburg.edu/zelle/python/
  2. Click on: graphics.py
  3. The window to allow you to open or save graphics.py appears
  4. Click on save. It is saved to your downloads directory.
  5. Display the downloads directory with Windows Explorer.
  6. Display this directory with Windows Explorer: C:\Python3x\Lib\site-packages
  7. Drag the graphics.py file from the downloads directory to this directory.

You can verify that it is installed successfully, by typing in the Python shell:

import graphics
If you get an error message, Python cannot find the graphics file. Make sure it is in the correct folder.

Running a Python program

You do not want to start a Python program running by double clicking on the icon of the .py file on your desktop! It will run the program in the command window, which immediately closes after the program finishes. You should start the IDE of your choice first (Wing IDE or IDLE) and then use File / open from the menus to get your file open. Then you can run it.

An explanation of program release numbers

Python is free and maintained by the Python Software Foundation. There is a 3.2 version on lab machines on UK campus. You may find older releases (2.x) on campus lab workstations. Only use Python 3.2 (or higher) for this class. The previous releases are incompatible with the textbook.

Programs have an associated release number. As program bugs are fixed and new features added, the release number changes. Python has three numbers associated with it separated by periods, for example: "Python 3.x.y"

The first number (3) is a major release number. It starts at 1 and only is incremented when major new features are added. The second number (x) is a minor release number. It is incremented for small changes or fixes that don't affect the users. The third number (represented by y) is a fix number within the minor release number. Any time the developers change the program to fix a problem, this number is incremented.