#!/usr/bin/env python # coding: utf-8 # # Getting Setup: Installing Jupyter # # This notebook describes how to get setup with Jupyter (formerly iPython Notebooks). It's part of the [The Art of Literary Text Analysis](ArtOfLiteraryTextAnalysis.ipynb). In particular, we'll look at: # # * [Downloading and installing Jupyter](#Downloading-and-Installing-Jupyter-with-Anaconda) # * [Launching Jupyter and creating a working directory](#Launching-Jupyter) # * [Creating a notebook](#Creating-a-Notebook) # * [Quitting Jupyter](#Quitting-Jupyter) # ## Downloading and Installing Jupyter with Anaconda # # [Anaconda logo](https://www.continuum.io/downloads) Setting up Jupyter is (usually) a smooth and painless process. The easiest and recommended option is to [download and install Anaconda](https://www.continuum.io/downloads), 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](https://www.continuum.io/downloads#_macosx), [Windows](https://www.continuum.io/downloads#_windows) or [Linux](https://www.continuum.io/downloads#_unix) 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](http://jupyter.readthedocs.org/en/latest/install.html). # ## Launching Jupyter # # Anaconda Launcher 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): # # Anaconda Launcher # # This should launch two more windows: # # 1. A terminal window where the Jupyter server ([kernel](Glossary.ipynb#kernel "The core computer program of the operating system which can control all system processes")) is running (this will be used to quit Jupyter later), and # 1. A web browser window that shows a [directory tree](Glossary.ipynb#directorytree "A tree like structure which represents the organization and hierachy of files within a directory") of your computer's file system (starting at the default path of Jupyter). # # 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. # ## Creating Folders # To create a new folder or notebook you use the _New_ button in the directory browser window. # # Jupyter Directory # # 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. # # Folder rename # # Now we have Jupyter running and we have a new folder for our notebooks, we're ready for the next step in [Getting Started](GettingStarted.ipynb). But just before that, let's look quickly at how we create a notebook and how we quit Jupyter. # ## Creating a Notebook # # Now you can create your first notebook. Use the same _New_ menu and pull down to the **Python 3** under the Notebooks heading in the menu. This will create your first notebook. We will review this and how to use notebooks in the next notebook [Getting Started](GettingStarted.ipynb). # ## Quitting 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](Glossary.ipynb#kernel "The core computer program of the operating system which can control all system processes") (so that our computer doesn't waste memory resources). To do that we do the following: # # 1. _Close and Halt_ any notebooks you have running by going to the _File_ menu of each running notebook, # 1. Switch to the terminal window that was opened by the launcher and hit Ctrl-c twice (keep your finger on the Control key and press the "c" twice), then # 1. Switch to the Anaconda Launcher application and quit it (just as you would any other application). # ## Next Steps # # Let's now proceed to [Getting Started](GettingStarted.ipynb). # --- # [CC BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) From [The Art of Literary Text Analysis](ArtOfLiteraryTextAnalysis.ipynb) by [Stéfan Sinclair](http://stefansinclair.name) & [Geoffrey Rockwell](http://geoffreyrockwell.com). Edited and revised by [Melissa Mony](http://melissamony.com). #
Created January 7, 2015 and last modified January 14, 2018 (Jupyter 5.0.0)