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)
- Test the
111Downloader.py
script on your computer (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.1.4, 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.
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 has that message along with extra quotation marks and commas). It should look like this:
If you run into trouble following these steps, please email Prof. 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.
3. Test the Downloader Script
For your convenience, we've provided a downloader script which checks the CS 111 website for updates and downloads any new files it finds, unzipping any zip files automatically. You can simply run this script to check for and download new lecture, exercise, project, and lab files. For now, you should run it once to make sure it works on your system, by following these instructions:
- The
111Downloader.py
script is included in thecs111
folder that you unzipped in the previous section. Just likelaunchNotebook.py
, open it using Thonny. - Run the script, and it should display messages about what it's searching for and what it downloads. For now, it should download at least the first week's exercises, since those are already linked on the schedule.
- Check your
cs111
folder for a newexercises
folder that contains a sub-folder for the week 1 exercises.
As before, if you have any problems running the downloader script please email Prof. Mawhorter (pmawhort) for help.
Links to Notebook Launchers
These links have the most recent version of a few different scripts that
are useful for managing Jupyter Notebooks, in case you need to download them individually. Each of these is included in the cs111
folder you already downloaded, but they may be updated here if necessary as the semester progresses. If you need to re-download one of them, right-click and select "save as" to download the file.
- launchNotebook.py is the basic notebook launcher. We'll include copies of this in the zip files for lectures and exercises.
- stopNotebooks.py
can be run to stop any currently running notebooks. MAKE SURE YOU SAVE
YOUR WORK FIRST! Might be useful if
launchNotebook
is getting stuck and refusing to launch a new server and/or if you have runlaunchNotebook
many times in different directories and want to clean things up a bit. - 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. You need to copy this file into the same directory as the notebook you want to clear out, then follow the instructions in the file.