How to install Python and which one to install?

Python has been transitioning from Python 2 to Python 3 for a ridiculously long time. This question was being asked in 2011 when I was wondering which version I should learn and what the difference actually was.
Currently Python 3 is probably your best bet, as most packages now support it and there are many improvements to the Python language in version 3.
That being said there are libraries that will only work in Python 2 and there is a huge amount of legacy code that has’t been transitioned yet. This might be especially true if you use specialist libraries in your work.
Another reason to use Python 2 is if you are doing the excellent Coursera course by Dr. Chuck which is being converted to Python 3 (I know this because I’m part of the open source project to do the conversion) but is still in Python 2.
For most people the difference between Python 2 and Python 3 comes down to how you print and what happens when you divide something. Printing now requires brackets around what you want to print - just like any other python function.
Python 3 Printing
name = 'Alistair'
print(name)
>>> Alistair
Python 2 Printing
name = 'Alistair'
print name
>>> Alistair
The other one, division, is integer division (where the remainder is discarded) in Python 2 and normal division in Python 3 (use ’//’ to do integer division in Python 3) if the numbers being used are integers. If at least one of the numbers is a floating point number (e.g. 1.5), the division is normal in both.
Python 3 division
answer = 10/3
print(answer)
>>>3.3333333333333335
Python 2 division
answer = 10/3
print(answer)
>>>3
So for anyone starting out with Python, the difference between the two versions is trivial and I’d suggest using Python 3 by default and Python 2 when you have to.

Python 2 and Python 3 will live happily side by side on a computer but the Anaconda package manager will make this situation a whole lot easier and has many other benefits as well.
So I would suggest installing the Python 3 Anaconda and then setting up a Python 2 environment for when you need it.
Download the version for your OS here and follow the instructions. There is both a command line installer and a graphical installer, so choose whatever you’re most comfortable with.
To setup a second environment like a Python 2 environment, come down to #Hackyhour at Bar Tsubu @Unimelb Parkville campus and we’ll get you sorted out! The instructions are on the Anaconda site too.
