Using a Conda environment in Jupyter: Difference between revisions
No edit summary |
(Increased the size of a figure.) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 22: | Line 22: | ||
=== Open Jupyter in Open OnDemand === | === Open Jupyter in Open OnDemand === | ||
Click on the Jupyter app in [https://ondemand.gacrc.uga.edu/ Open OnDemand] and click launch at the bottom of the page to start a Jupyter Notebook session. <br> | Click on the Jupyter app in [https://ondemand.gacrc.uga.edu/ Open OnDemand] and click launch at the bottom of the page to start a Jupyter Notebook session. <br> | ||
[[File:Screenshot 2023-12-13 at 10.25.00 AM.png|alt=|border|700x700px]] | |||
Once the job starts, click on Connect to Jupyter. This will open Jupyter in a new page in your browser. <br> | Once the job starts, click on Connect to Jupyter. This will open Jupyter in a new page in your browser. <br> | ||
From here, click "new" and you should see the name of the ipykernel you created. Clicking on that will start a Jupyter notebook with a kernel that has access to all of the packages in your Conda environment. | From here, click "new" and you should see the name of the ipykernel you created. Clicking on that will start a Jupyter notebook with a kernel that has access to all of the packages in your Conda environment. | ||
[[File:Load_condakernel.png|alt=|border|1111x1111px]] |
Latest revision as of 09:43, 22 January 2024
Conda environment
A Conda environment is a type of virtual environment. Conda environments are used to contain a set of software/packages that you install (via Conda) into that environment that may be accessed any time you activate the environment. To learn more about Conda environments, please see our wiki page on creating Conda environments here.
Open OnDemand
Open OnDemand is a web-based service that allows users to run software with a graphical user interface (GUI) such as Jupyter Notebook. Please see our wiki page on Open OnDemand here to learn more.
Using a Conda environment in Jupyter
These steps will allow you to access the software you install into a Conda environment within Jupyter Notebook running on Open OnDemand
Create the Conda environment
Create your Conda environment and install any packages you will want to use.
Install ipykernel
While your Conda environment is still activated, install ipykernel to your Conda environment with:
conda install ipykernel python -m ipykernel install --user --name=my_env
Note: change my_env to whatever the name of your Conda environment is. This is the name that you will see in Jupyter Notebook as an available kernel.
Open Jupyter in Open OnDemand
Click on the Jupyter app in Open OnDemand and click launch at the bottom of the page to start a Jupyter Notebook session.
Once the job starts, click on Connect to Jupyter. This will open Jupyter in a new page in your browser.
From here, click "new" and you should see the name of the ipykernel you created. Clicking on that will start a Jupyter notebook with a kernel that has access to all of the packages in your Conda environment.