Python on Windows
To install Python on a Windows machine, follow these steps:
- Go to http://www.python.org/download/
- 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.
- Run the downloaded file. This brings up the Python installation wizard.
- 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.
If it’s installed, the Python interpreter should start now with the output similar to the following:
[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
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
For RedHat, CentOS, or Fedora
For Gentoo
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:
- Go to http://www.python.org/download/
- 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.
- Run the downloaded .dmg file.
- In the mounted disk image, you’ll find an installer package (.mpkg) file. double-click the file.
- Complete the installation by accepting all the default settings in the Python installation wizard.
Python Tutorial: Installing Python