Claire introduces the basics of Python 3 using jupyter notebooks.

To follow along, it’s suggested to follow the instructions below to install a compatible python environment.

Installing Python on your machine

All operating systems come with some Python version installed. But you still might want to install your own so you can keep it updated as needed. Additionally, you will need more than the default Python for your work, so we’ll see here how to install the minimum you might need.

  1. Install miniconda or anaconda Follow the instructions ​on https://conda.io/projects/conda/en/la… for your operating system.
  2. Install Python and a few other packages Now you need to create what is called a conda environment. For our purposes, you’ll want to run this command in a terminal (for Windows see below): conda create –name ENVNAME python jupyter xarray cartopy. Choose whatever name you want for your environment instead of ENVNAME. Avoid “python” only because this environment is more than the default Python. You might need to type this name fairly often, so keep it short and easy to remember. For Windows, see ​the instructions​ at https://conda.io/projects/conda/en/la… to start the Anaconda prompt. It will come up with a long list of packages to install and ask: Proceed (y/n)? Accept by pressing Enter.
  3. Activate the environment Now, before starting Python, you will always need to activate your environment. This is done from your terminal or the Anaconda prompt (for Windows users): conda activate ENVNAME Obviously, ENVNAME should be replaced by the name of the environment you created in step 2. Finally, for Mac and Linux users, you can add this `conda activate` command to your .bashrc, .profile etc. (depending on the shell you use) if you want to activate Python by default when starting a terminal.