Oscar
HomeServicesDocumentation
  • Overview
  • Quickstart
  • Getting Started
  • System Hardware
  • Account Information
  • Short "How to" Videos
  • Quick Reference
    • Common Acronyms and Terms
    • Managing Modules
    • Common Linux Commands
  • Getting Help
    • ❓FAQ
  • Citing CCV
  • CCV Account Information
  • Student Accounts
  • Offboarding
  • Connecting to Oscar
    • SSH (Terminal)
      • SSH Key Login (Passwordless SSH)
        • Mac/Linux/Windows(PowerShell)
        • Windows(PuTTY)
      • SSH Configuration File
      • X-Forwarding
      • SSH Agent Forwarding
        • Mac/Linux
        • Windows (PuTTY)
      • Arbiter2
    • Open OnDemand
      • Using File Explorer on OOD
      • Web-based Terminal App
      • Interactive Apps on OOD
      • Using Python or Conda environments in the Jupyter App
      • Using RStudio
      • Desktop App (VNC)
    • SMB (Local Mount)
    • Remote IDE (VS Code)
      • From Non-compliant Networks (2-FA)
      • Setup virtual environment and debugger
  • Managing files
    • Oscar's Filesystem
    • Transferring Files to and from Oscar
    • Transferring Files between Oscar and Campus File Storage (Replicated and Non-Replicated)
    • Resolving quota issues
      • Understanding Disk Quotas
    • Inspecting Disk Usage (Ncdu)
    • Restoring Deleted Files
    • Best Practices for I/O
    • Version Control
  • Submitting jobs
    • Running Jobs
    • Slurm Partitions
    • Interactive Jobs
    • Batch Jobs
    • Managing Jobs
    • Job Arrays
    • MPI Jobs
    • Condo/Priority Jobs
    • Dependent Jobs
    • Associations & Quality of Service (QOS)
  • GPU Computing
    • GPUs on Oscar
      • Grace Hopper GH200 GPUs
      • H100 NVL Tensor Core GPUs
      • Ampere Architecture GPUs
    • Submitting GPU Jobs
    • Intro to CUDA
    • Compiling CUDA
    • Installing Frameworks (PyTorch, TensorFlow, Jax)
      • Installing JAX
      • Installing TensorFlow
    • Mixing MPI and CUDA
  • Large Memory Computing
    • Large Memory Nodes on Oscar
  • Software
    • Software on Oscar
    • Using Modules
    • Migration of MPI Apps to Slurm 22.05.7
    • Python on Oscar
    • Python in batch jobs
    • Installing Python Packages
    • Installing R Packages
    • Using CCMake
    • Intro to Parallel Programming
    • Anaconda
    • Conda and Mamba
    • DMTCP
    • Screen
    • VASP
    • Gaussian
    • IDL
    • MPI4PY
  • Jupyter Notebooks/Labs
    • Jupyter Notebooks on Oscar
    • Jupyter Labs on Oscar
    • Tunneling into Jupyter with Windows
  • Debugging
    • Arm Forge
      • Configuring Remote Launch
      • Setting Job Submission Settings
  • MATLAB
    • Matlab GUI
    • Matlab Batch Jobs
    • Improving Performance and Memory Management
    • Parallel Matlab
  • Visualization 🕶
    • ParaView Remote Rendering
  • Singularity Containers
    • Intro to Apptainer
    • Building Images
    • Running Images
    • Accessing Oscar Filesystem
      • Example Container (TensorFlow)
    • Singularity Tips and Tricks
  • Installing Software Packages Locally
    • Installing your own version of Quantum Espresso
    • Installing your own version of Qmcpack
  • dbGaP
    • dbGaP Architecture
    • dbGaP Data Transfers
    • dbGaP Job Submission
  • RHEL9 Migration
    • RHEL-9 Migration
    • LMOD - New Module System
    • Module Changes
    • Testing Jupyter Notebooks on RHEL9 mini-cluster
  • Large Language Models
    • Ollama
Powered by GitBook
On this page
  • Python Environments:
  • One Time Setup:
  • Launching Jupyter Notebook
  • Conda Environments
  • One Time Setup:
  • Launching Jupyter Notebook

Was this helpful?

Export as PDF
  1. Connecting to Oscar
  2. Open OnDemand

Using Python or Conda environments in the Jupyter App

PreviousInteractive Apps on OODNextUsing RStudio

Last updated 1 year ago

Was this helpful?

We recommend all users to install Python packages within an environment. This can be a Conda to a python virtual environment. More information can be found . Follow these steps to use such environments in the .

Python Environments:

One Time Setup:

  1. Open a terminal on Oscar.

  2. Load the relevant python module and create and/or activate the environment. See this page for more information about creating .

  3. Run pip install notebook to install Jupyter notebook, if not already installed.

  4. Run pip install ipykernel to install ipykernel in this environment.

  5. Run python -m ipykernel install --user --name=<myenv> where <myenv> is the name of the environment.

Launching Jupyter Notebook

  1. Open the "Basic Jupyter Notebook for Python Environments" app on the Open OnDemand interface

  2. Under "Python Module on Oscar", choose the python module you loaded when the environment was created.

  3. Under "Python Virtual Environment", add the name of the Virtual Environment you created. Note: If your virtual environment is not at the top level of your home directory, you should input the absolute path to the environment directory.

  4. Under the "Modules" , enter the name of the python module used to create the environment. Add any additional modules you may need separated with a space.

  5. Choose the other options as required.

  6. Click "Launch" to start the job

  7. Click "Connect to Jupyter" on the next screen.

  8. To start a new notebook, click "New" -> <myenv> where <myenv> is the environment.

  9. For starting a pre-existing notebook, open the notebook. In the Jupyter interface, click "Kernel" -> "Change Kernel" -> <myenv> where myenv is the name of the environment.

Conda Environments

One Time Setup:

  1. Open a terminal on Oscar.

  2. Activate the conda environment.

  3. Run pip install notebook to install Jupyter notebook, if not already installed.

  4. Run pip install ipykernel to install ipykernel in this environment.

  5. Run python -m ipykernel install --user --name=<myenv> where <myenv> is the name of the environment.

Launching Jupyter Notebook

  1. Open the "Basic Jupyter Notebook with Anaconda" app on the Open OnDemand interface

  2. Under "Oscar Anaconda module", choose "anaconda/2020.02"

  3. Enter the name of the conda environment in "Conda Env"

  4. Choose the other options as required.

  5. Click "Launch" to start the job

  6. Click "Connect to Jupyter" on the next screen.

  7. To start a new notebook, click "New" -> <myenv> where <myenv> is the environment.

  8. For starting a pre-existing notebook, open the notebook. In the Jupyter interface, click "Kernel" -> "Change Kernel" -> <myenv> where myenv is the name of the environment.

here
Jupyter app
virtual environments