Previous | Next


Python on Windows

To install Python on a Windows machine, follow these steps:

  1. Go to http://www.python.org/download/
  2. Download Python 2.7.x or 3.2.x Windows Installer from the list. Python 2.7.x and 3.2.x are the version of python available for download at this moment.
  3. Run the downloaded file. This brings up the Python installation wizard.
  4. Complete the installation by accepting all the default settings in the Python installation wizard.

 

Python on Linux

Python interpreter is bundled with most of the Linux distro. You can check whether python is installed or not by running the command in the bash console.

$ python

If it’s installed, the Python interpreter should start now with the output similar to the following:

Python 2.7.3 (default, Apr 10 2012, 23:31:26)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Otherwise, you will get an error message similar to the following

$ python: command not found

No worry in case Python interpreter is not installed in your Linux box. Python can be obtained in a variety of ways depending on the Linux distro that you are using.

For Debian or Ubuntu

$ sudo apt-get install python

For RedHat, CentOS, or Fedora

$ yum install python27

For Gentoo

$ emerge python

 

Python on Mac OS

Python is pre-installed with Mac OS X 10.2 and above. Just open the Terminal application and enter the command python to start. In case, you are using old Mac OS X or you would like to re-install Python on your Mac machine, then follow these steps:

  1. Go to http://www.python.org/download/
  2. Download Python 2.7.x or 3.2.x Mac OS X Installer from the list. Python 2.7.x and 3.2.x are the version of python available for download at this moment.
  3. Run the downloaded .dmg file.
  4. In the mounted disk image, you’ll find an installer package (.mpkg) file. double-click the file.
  5. Complete the installation by accepting all the default settings in the Python installation wizard.

Previous | Next