Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this page:

...

Example: Create a conda environment with a Python kernel 

1. First, log in to the IDAS research instance with Python. If you are a student in a class that uses Python in IDAS, follow the instructions here to access to access your class instance.

2. In JupyterLab, click the "Terminal" tile under "Other" to start a Terminal session.

...

    • You can also install packages when creating an environment, e.g.: 
      • conda create -n another-env python=3.8 numpy requests
    • You can specify the versions of the packages, e.g.: 
      • conda create -n another-env python=3.7 numpy=1.16.1 requests=2.19.1
    • You can also create a conda environment from an environment.yml file, e.g,
      • condaenvcreate-fenvironment.yml
    • For more examples of creating conda environments, please see "Managing environments" in the Conda User Guide.

...

The value for "--name" is used by Jupyter internally. Any existing kernel with the same "--name" value will be overwritten. The "--display-name" will be displayed in the Notebook menu in the JupyterLab Launcher page.


8. Go back to the JupyterLab Launcher page by pressing Ctrl+Shift+L (Windows) or Cmd+Shift+L (Mac). Under "Notebook", a new option for your kernel will now be available. In this example screenshot, the "Python Project Vis" kernel was just installed and now became available to use.

Click on that new option to start a notebook. In that notebook, you can use the packages that you installed in the conda environment.

Image Modified




9. To install Python packages to this conda environment using a Jupyter notebook:

...

Example: Create a conda environment with an R kernel 

1. First, log in to the IDAS research instance with Python. If you are a student in a class that uses Python in IDAS, follow the instructions here to access to access your class instance.

2. In JupyterLab, click the "Terminal" tile under "Other" to start a Terminal session.

...

Note that we specified the R version (3.6.1) in the "name" and "displayname". This helps remind us what R version we are using, especially if we have multiple conda environments and kernels.


8. Go back to the JupyterLab Launcher page by pressing Ctrl+Shift+L (Windows) or Cmd+Shift+L (Mac). Under "Notebook", a new option for your kernel will now be available, with the name "R 3.6.1"

Click on that new option to start a notebook. In that notebook, you can use the packages that you installed in the conda environment.


9. To install R packages in this conda environment, in Terminal:

...