Jupyter Cheat Sheet
We use Jupyter Notebook for several assignments with Python. This app allows us to write, test and store Python code in one interactive file that opens in a web browser.
We installed Jupyter in a Python virtual environment using these instructions:
We created the virtualenv in a folder named
jupyter_work and installed Jupyter there.
All of that is done ONLY ONCE.
To launch Jupyter Notebook
cd into the folder (e.g.
jupyter_work) where you set that up.
Activate the virtualenv (at the bash prompt):
Start Jupyter Notebook (at the bash prompt):
Everything else happens in your web browser. Choose the file you want to open from the list there. If the file isn't there yet, you can use the Mac Finder to drag it into the folder in the usual way (or Windows).
To quit Jupyter Notebook
This is a two-step process. First you need to save and close your work in the web browser.
- To save your work, Command-S.
- To save and exit from the notebook, open the Jupyter File menu and select "Close and Halt."
- Click LOGOUT in the upper right corner.
Then, in the Terminal, press Control-C — NOT Command.
Still in Terminal — type
y (lowercase) and press Enter/Return.
Quit from your virtual environment
Deactivate the virtualenv (at the bash prompt):