Getting Started

To install on Linux:
$ yum install python
$ sudo apt-get python
install from source. To install from source, download python from

To test if the installation worked, type python on the terminal. You would get the following prompt:

Python 2.4.3 (#1, Jan 21 2009, 01:10:13)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

type 2+2 after the >>>

>>> 2 + 2

If you get 4 as the response, python is installed and working properly

To install on windows:
Download python from and double click to install. When installation is complete, set the system path to the installation directory.

  1. Click on Start > Control Panel > System > Change Settings > Advanced > Environment Variables
  2. Choose Path from bottom window
  3. Click on Edit
  4. append ;c:\Python26 to the end of the line (assuming python installed at c:\Python26)

To test the installation, open the command prompt. If you do not see command prompt in the list of installed programs, search for cmd or click on start > run and type cmd.
type python in the command prompt
when you get a message followed by >>>, type 2+2
If you get 4 as the response, python is installed and working properly

If you just type python on the command line, you get >>> which allows you to run your scripts immediately. To exit python command prompt, type:


If you need to run large programs, type them with a text editor such as notepad, editplus, vi, gedit, emacs that does not add formatting to your text and simply save the file with a .py extension. They type python followed by the your python file name.