02 - Installing Python and Running First Python Script

2.1 Installing Python

First you need to make sure that Python is not installed on your version of Operating System. Good news is that many new modern versions of OS allready come with the Python installed. If you are running on Mac or Ubuntu there is big possibility that you allready have Python on your machine and you can skip this step.

To check if you have python installed, open command prompt or terminal (depends on Operating System) and type:

python --version

If you get something like ’Python 2.7.9’ or ’Python 3.4.3’, it means that you have Python installed. But if you get something like ’error command python not recognised’ or similar, then you need to install the Python and add it to your system Path to be able to use it from command prompt.

There are two supported Python versions: 2.x and 3.x.

Version 2.x is the original version of the Python and is still very widelly supported throughout industry. For example GoogleApp engines are supporting 2.7, version that comes with Mac and Ubuntu is 2.7, etc. There is also a bigger number of libraries for Python version 2 then for version 3. Anyway in this tutorial we will use version 2.7.9.

So to install Python go to the www.python.org/downloads/ and choose the version that suits you and choose it for the Operating system you’re using.

 

Like us on Facebook