Python
In this lesson, we will use Python with the Numpy and Numba libaries, and we will interact with Python via the Jupyter notebook interface, a programming environment that runs in a web browser. You can install each of these by hand, but we would recommend that you download Anaconda, an all-in-one installer including all these prerequisites.
Regardless of how you choose to install it, please make sure you install Python version 3.x (e.g., 3.6 is fine).
For the Jupyter Notebook to work you will need a reasonably up-to-date browser. The current versions of the Chrome, Safari and Firefox browsers are all supported (some older browsers, including Internet Explorer version 9 and below, are not).
- Open https://www.anaconda.com/download/#windows with your web browser.
- Download the Python 3 installer for Windows.
- Install Python 3 using all of the defaults for installation except make sure to check Add Anaconda to my PATH environment variable.
- Open https://www.anaconda.com/download/#macos with your web browser.
- Download the Python 3 installer for OS X.
- Install Python 3 using all of the defaults for installation.
- Open https://www.anaconda.com/download/#linux with your web browser.
- Download the Python 3 installer for Linux.
(The installation requires using the shell. If you aren't comfortable doing the installation yourself stop here and request help at the workshop.) - Open a terminal window.
-
Type
bash Anaconda3-
and then press Tab. The name of the file you just downloaded should appear. If it does not, navigate to the folder where you downloaded the file, for example with:cd Downloads
Then, try again. -
Press Return. You will follow the text-only prompts. To move through
the text, press Spacebar. Type
yes
and press enter to approve the license. Press enter to approve the default location for the files. Typeyes
and press enter to prepend Anaconda to yourPATH
(this makes the Anaconda distribution the default Python). - Close the terminal window.