This notebook describes how to get setup with Jupyter (formerly iPython Notebooks). It's part of the The Art of Literary Text Analysis. In particular, we'll look at:
Setting up Jupyter is (usually) a smooth and painless process. The easiest and recommended option is to download and install Anaconda, which is a freely available bundle that includes Python, Jupyter, and several other things that will be useful to us. It's very important for the purposes of our notebooks to select a version for Mac OS X, Windows or Linux of Anaconda with Python 3.x (not Python 2.x).
Once the Anaconda 3.x installer program is downloaded you can click on the installer and follow the instructions (using the defaults will work just fine). If you encounter difficulties, you may want to consult the Jupyter installation documentation.
Once you've installed Anaconda, the easiest way to launch Jupyter is to use the Anaconda Navigator (which you should be able to find in your Applications folder on Mac or your Programs menu on Windows).
The Anaconda Navigator will present several applications to choose from, we'll click on the Launch button of notebook (Jupyter Notebook):
This should launch two more windows:
The default path on a Mac is the user's "Home" directory. We probably don't want to create Jupyter notebooks there, so we'll navigate to another directory (like "Documents") and create a new folder (like "Notebooks"). The location and names aren't important but we'll need to remember where our notebooks are for future use.
To create a new folder or notebook you use the New button in the directory browser window.
Creating a new folder gives a default name (like "Untitled Folder") but we can select the folder using the checkbox to the left and then click the rename button that appears before giving the folder a new name.
Now we have Jupyter running and we have a new folder for our notebooks, we're ready for the next step in Getting Started. But just before that, let's look quickly at how we create a notebook and how we quit Jupyter.
The browser window that was opened by the Anaconda Launcher is just a regular window. If we'd been working on a notebook, we'd of course want to save our work before quitting. We don't need to do this for browser (directory) windows. We can close the browser window(s) created by Jupyter in the usual browser way. Then we have to shut down the server kernel (so that our computer doesn't waste memory resources). To do that we do the following: