Jupyter Notebooks: Difference between revisions

From Stat DS Computing Wiki
Jacobg2 (talk | contribs)
No edit summary
Jacobg2 (talk | contribs)
No edit summary
Line 28: Line 28:
'''Jupyter Notebook Path''' - The path the Notebook environment lives on. You can use the default path, which has many statistical related Python packages preinstalled, or you can define your own Notebook Environment. See Below for details on how to set your own environment up.
'''Jupyter Notebook Path''' - The path the Notebook environment lives on. You can use the default path, which has many statistical related Python packages preinstalled, or you can define your own Notebook Environment. See Below for details on how to set your own environment up.


[[index.php%3Ftitle=File:Jupyter_Notebook_Page.png|alt=|frameless|462x462px]]
[[File:Jupyter Notebook Page.png|frameless]]




Line 44: Line 44:
# Install the Jupyter Notebook application to the new Python virtual environment.
# Install the Jupyter Notebook application to the new Python virtual environment.
#* ''pip install notebook''
#* ''pip install notebook''


To use your own Jupyter Environment, replace the default path above in step 3 for Jupyter Notebook Path.
To use your own Jupyter Environment, replace the default path above in step 3 for Jupyter Notebook Path.

Revision as of 14:17, 16 September 2025

Running Jupyter Notebooks is now possible with Open OnDemand. To run a Notebook, follow the steps below.

1 - Log in to Open OnDemand.

2 - Click the Interactive Apps drop down menu and then select Jupyter Notebooks.







3 - You will be taken to a new page where you will see options to launch a Jupyter Notebook. Fill out the form and then click the Launch button.

Hours - The number of hours your Notebook will run.

Server - The server to run your Notebook on.

Jupyter Notebook Path - The path the Notebook environment lives on. You can use the default path, which has many statistical related Python packages preinstalled, or you can define your own Notebook Environment. See Below for details on how to set your own environment up.


4 - You will be taken to another new page where the Jupyter Notebook session will load. Once it's ready, click the Connect to Jupyter at the bottom. You will then be taken to a new tab with your Notebook session.

Custom Jupyter Notebook Environment

To build a custom Notebook environment, you can use a Python package manage such as Momba, but you can also use Python's built in virtual environments. This example will cover such.

  1. Declare the virtual Python environment.
    • python3 -m venv /path/to/your/jupyter_env
  2. Activate the virtual environment.
    • source /srv/jupyter_env/bin/activate
  3. Install the Jupyter Notebook application to the new Python virtual environment.
    • pip install notebook

To use your own Jupyter Environment, replace the default path above in step 3 for Jupyter Notebook Path.