JupyterLab and Jupyter Notebook #
JupyterLab is a modern interface that allows users to work with multiple documents (including Jupyter notebooks, text editors, terminals, and more) in a flexible, integrated environment tailored to their project. Jupyter Notebook offers an interactive environment for combining code, visualizations, and narrative text. This page explains how users can manage their own environments and use them within Jupyter.
For more information about the differences between JupyterLab and Jupyter Notebook (and which is best for your project), see this Jupyter community forum thread.
Set Up Python Virtual Environment #
Connect to an Open OnDemand desktop at https://orca.pdx.edu/docs/open-ondemand/. Then start a terminal and run the following command:
$ module load python
$ python --version
Python 3.14.0
Create a Virtual Environment #
First, you will need a name for your environment. In this example, we will use the name ‘myproj’. Then, run the following commands:
$ python -m venv myproj
$ source myproj/bin/activate
Where ‘myproj’ is, replace it with your environment’s name.
Install Project-Specific Packages #
To install project-specific packages, run the following command:
$ pip install --upgrade pip
$ pip install pandas # for example
$ pip install torch torchvision # if needed
Create the IPython Kernel #
To use your environment from within Jupyter, you need to create and register an IPython Kernel (ipykernel).
$ pip install ipykernel
$ python -m ipykernel install --user --name myproj --display-name "Python (myproj)"
From there, you can log out of the OnDemand Desktop if you want to.
Start Jupyter Notebook or Lab #
From the Open OnDemand screen at https://openondemand.orca.pdx.edu/, select ‘Jupyter Lab’ or ‘Jupyter Notebook’ from the Interactive Apps pull down menu.

Enter the number of cores and GPUs you would like to use for your project and click ’launch’.

The next screen will show the status of the job, when it is ready click the connect button.

Connect to an Existing Python Virtual Environment #
Use the ‘New’ pulldown in the upper right corner of the notebook screen to select the Python kernel you created above.

If you open an existing notebook, Jupyter will prompt for the kernel to use.

In Jupyter Lab, the available kernels will be displayed in the ‘Notebook’ section of the ‘Launcher’ tab on the screen.
