Software for CS111
This page provides links to download software for this class onto your personal laptop. In an ideal scenario, all three programs would be downloaded to your personal laptop before the first day of class.
CS111 students need the following:
- Thonny (to write/run Python code)
- Download and run a test Jupyter notebook (see details below)
If you encounter problems with the installation process, please email Peter Mawhorter (pmawhort).
Instructions
1. Thonny
You can download installers for Thonny below. By clicking on the blue links below, the installer will automatically download to your machine. Double-click on the installer, and it will start the process of installing Thonny.
You'll see this screen when the installer starts (although note that we're now going to be using version 4.0.1, not 3.3.13):

Click through each of the sections (License, Destination Select, Installation Type, Installation, Summary). When given options, if you are uncertain, use the default suggested by the installer. Eventually, you will arrive at this screen:

which tells you that Thonny was successfully installed on your machine. We will review how to use Thonny during the first lab.
2. Test a Jupyter notebook
We'll use Jupyter notebooks in lab where you can write and run python code. You will need to keep them organized in a common folder, so that you can run them using a file we've provided called launchNotebook.py
.
Please use this link to download a zip file containing the launchNotebook.py
program and a Jupyter notebook for testing.
Instructions:
- Clicking on the link above should automatically download the
cs111_setup.zip
file to your computer. This file should end up in yourDownloads
folder. - In the
Downloads
folder, Unzip thecs111_setup.zip
file, which creates the foldercs111
. Some systems automatically unzip the file to create the folder. If not, you'll need to do it manually:- To unzip a
.zip
file on a Mac, double-click it. - To unzip a
.zip
file on Windows, right-click and choose Extract here.
- To unzip a
- Move this cs111 folder to a place where you want to keep it all semester. Your Desktop is one easy place to put it, but you could also put it in your Documents folder, or another folder where you keep your class files organized.
- Using Thonny, open the
launchNotebook.py
file in thecs111
folder, wherever you placed it. To do this in Thonny, from the File menu, select Open, and navigate to yourcs111
folder, and thelaunchNotebook.py
file within thecs111
folder SelectlaunchNotebook.py
and press the Open button. At this point, your Thonny window should be displaying thelaunchNotebook.py
file in the editor pane at the top of the window, and the Python shell at the bottom of the window should be mostly empty, like this: -
Click the Thonny run button
(or choose Run current script from the Run menu) to run the
launchNotebook.py
file. It may take a moment because it has to install some things, but this should only be necessary once. It should display a bunch of output in the Pythton shell at the bottom of the Thonny window, and eventually launch a tab in your web browser, displaying the contents of thecs111
folder. You will use this tab (which you can get back by runninglaunchNotebook.py
again) to launch all of the notebooks for this class.Note: If you get an error message at this step saying "looks like this file or folder is not writeable" it probably means you are on Windows and have forgotten to unzip the zip file.
-
In the browser tab, navigate to the
notebook_test
folder and open thecs111_setup_test.ipynb
file you find there. This will open a second browser tab which runs the notebook. - Make sure the notebook is working. Follow the directions in the notebook and
confirm that it displays the message "Python is working in this notebook"
(in addition to the code which ash that message along with extra quotation
marks and commas). It should look like this:
If you run into trouble following these steps, please email Peter Mawhorter (pmawhort) for help.
For lectures and exercises in this class, you will be downloading zip files
containing notebooks. Once you have extracted these zip files, you should put
the resulting folders into the cs111
folder you created in this step in order
to be able to access the notebooks via launchNotebook.py
as you just did in
this setup task.
Links to Notebook Launchers
These links have the most recent version of a few different scripts that are useful for managing Jupyter Notebooks. For each link, right-click and select "save as" to download the file.
launchNotebook.py
is the basic notebook launcher. You should have one copy of it in your CS 111 folder on your own computer, and you should move files you download into that folder so you can access them from the notebook it launches.stopNotebooks.py
can be run to stop any currently running notebooks. MAKE SURE YOU SAVE YOUR WORK FIRST! Useful whenlaunchNotebook
is getting stuck and refusing to launch a new server.clearNotebook.py
can be used to clear out all of output from a notebook. This can be useful if you've created an infinite loop that put too much output into a notebook for you to open it properly.