Setting up a Jupyter Notebook

The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more. The following instructions will explain how to setup a Jupyter Notebook securely within your terminal.

FastX

  1. Follow the instructions for using FastX to access your terminal found in the "Using FastX" article here or on the RC wiki.

Loading Python in your Terminal

The Jupyter Notebook relies on Python, so you must load in a version of Python that works with Jupyter. The following line should be written in the command line:

  1. $ module load python/3.7.2-gcc-7.4.0-6on2qnpy

This will have to be reloaded every time you start a new session, or you can see how to load modules permanently in the "Using Modules" article.

Installing Anaconda

Anaconda is the program that is used to create the Jupyter Notebook. Complete the following commands and instructions in your terminal to install:

  1. $ cd ~/Downloads
  2. $ wget https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
  3. $ bash ./Anaconda3-2019.03-Linux-x86_64.sh.
  4. Hit enter to scroll through terms and conditions and answer yes to all questions
  5. $ cd ~
  6. $ source ~/.bashrc

The name anaconda3 should now be visible as a directory off of your user directory (enter the command $ ls in the command line while in your home directory to view this).
 

Creating the Jupyter Notebook

Now that Anaconda is installed, the last step is to set up a Jupyter Notebook The following commands will set up your configuration files and a password to be used for others to access the notebook.

Complete the following steps in your terminal:

  1. $ cd ~/anaconda3

  2. $ cd bin

  3. $ ./jupyter notebook --generate-config

  4. $ ./jupyter notebook password

  5. Enter and verify the password you would like your notebook to have

  6. $ ./jupyter notebook

A browser should open in your FastX session with your Jupyter Notebook. You will be prompted for the password you just set up, and the Notebook should be ready to use.

Information about the notebook, such as the URL other users need on order to access the notebook, will be shown in the terminal.

Opening a Previously Created Notebook

Creator:

Enter in Terminal:

  1. $ module load python/3.7.2-gcc-7.4.0-60n2qnpy  #only needed if not set to be auto-loaded when the session is created

  2. $ cd ~/anaconda3

  3. $ cd bin

  4. $ ./jupyter notebook

Other User:

In your FastX session, open up activities and select Firefox to open a browser. The creator of the Notebook will have to give you the URL and password for the notebook. Enter the URL given to you in the browser and enter the password when prompted. You should then have access and be ready to use the Notebook.

 

If there are any further questions, or there is an issue with the documentation, please contact rc-help@rit.edu for additional assistance.