Installation involves installing
Python 3, setting up your local environment and testing that it works. The following steps walk you through this.
MacOS / Linux
First, open your
On MacOS, you can do this by going to
Applications/Utilities/Terminal or, using Spotlight by pressing the
command + space keys, and searching for “Terminal”).
Copy & paste the following into your terminal and press the
$ curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh --output ~/miniconda.sh
$ curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh --output ~/miniconda.sh
Once this has finished, copy & paste the following and hit the
$ bash ~/miniconda.sh
Agree to the terms of service.
space, and then
return when you are asked to accept the default install location.
Enter “yes” when prompted by “Do you wish the installer to prepend the Miniconda3 install location to PATH in your ~/.bashrc?”
Download the installer from here.
Double click the
.exe file to start the installation. Accept the terms of service, and leave all the default values when installing.
Setup your environment
We need to create a virtual environment and install
jupyter. Note, you only have to do this ONCE!
The instructions here are almost identical for MacOS / Linux and Windows.
- MacOS / Linux, you run all these commands from your terminal.
- On Windows, type Anaconda in the search box, choose Anaconda Prompt from the list. Run all these command from there.
First, lets create an environment called
conda create -n C4M python=3.6
When conda asks you to proceed, type
proceed ([y]/n)? y
Activate this environment that you just created with
source activate C4M
Then copy & paste the following to install
conda install -c conda-forge jupyterlab
yif prompted. This might take a little bit.
And finally, run
conda install nb_conda
y if prompted.
Using the jupyter notebooks
Everything in this class will happen through the
jupyter notebooks. Notebooks are somewhere we can mix code and english, and run the code right in our browsers. Every time you wish to open a notebook, you need to
First, activate your environment
MacOS / Linux
$ source activate C4M (C4M) $ # you should notice your command prompt change when the environment is active!
$ conda activate C4M (C4M) $
(C4M) $ jupyter lab
This will open a page in your browser. Use it to find
hello_world.ipynb on your computer.
You can download the
hello_world.ipynb notebook from here.
Follow the instructions in the notebook to make sure you installed everything correctly.