Back to Resources

On Your Own Machine

by Brad Solomon

This guide will help you get started setting up an environment on your personal computer to let you run all the lab and mini-project code locally.

1) Install Python3

All code in this class will be written (and graded) using Python3. This has slightly distinct syntax and functions than Python2 (which most Macs have natively) so be sure to update, install, and use the appropriate version. Regardless of your operating system, you should find straightforward download instructions at the official Python page: link

2) Install Python3 packages

Starting with version 3.4 the preferred installer program, pip, (which actually stands for ‘Pip installs Packages’) should be automatically included with the download. Accordingly the next steps should be very easy – you just need to run the following commands in your terminal or command prompt shell. To access this, on a Mac/Linux search for ‘terminal’ and on Windows search for ‘Command Prompt’.

pip3 install numpy
pip3 install matplotlib

As you might expect, this will install numpy and matplotlib respectively. Be sure to use pip3 (for your python3 installation)!

3) Install VSCode

VSCode is the class-recommended environment for coding locally on your machine. It has everything you need in one window (a file explorer, coding environment, and terminal window) as well as numerous extensions you can install to improve your personal experience. You can download the software at the following link: VSCode

Once you have it installed, you should download and install one of the following:

The Python extension (ms-python.python) link. This will automatically install the Jupyter notebook extension along with several other features.

The Jupyter notebook extension (ms-toolsai.jupyter) link. If you want a smaller download without any of the features of the Python extension beyond Jupyter, just download this!

4) Test your installation

If you’ve done these three steps you should have Python locally on your computer (if you didn’t already have it) along with all the necessary packages and addons for most or all of the class. Feel free to run any of your favorite Python programs to make sure it works, or using your terminal or command prompt run a quick interactive session by typing ‘python’ or ‘python3’ as a command. If you can type the line ‘import numpy’ and ‘import matplotlib’ without getting an error message, you are set!