Dark theme

Intro to running Python

The best way to write and run Python scripts is using an install called "Anaconda".

Python itself comes as a set of software which can be downloaded from the Python website, but there are also a wide variety of libraries that almost anyone working with Python will want, along with software to help you write code (called "Integrated Development Environments" or IDEs). Anaconda bundles all these up with the core Python software in a way that makes it very easy to use.

First and foremost, Python comes in two, incompatible, versions: 2 and 3. Anaconda installs both, and lets you flip between them (same for Jupyter/iPython Notebook), but uses one version as the default. It is better to get used to 3 if you are starting, as this is the latest. You can find a list of the differences here -- you will eventually need to get your head around them as there is plenty of old version 2 code out there.

Anaconda is installed in our labs, so if you're working there you won't need to install anything else. If you're at home, and you don't yet have Anaconda, download the appropriate version 3 for your machine (if you don't know whether your machine is 32 or 64 bit, and your machine is modern, try the 64 bit version) now, and install it.

If you're working on Windows at home, you may also like to install Notepad++, a popular programmers' text editor. It has lots of useful features for coding. On Mac's, use TextEdit, but note that by default it sometimes saves files as RTF – you'll need to change this to plain text.