How do I install new packages in JupyterLab server?

⚠️ If you need additional packages or dependencies for your course that are not already available in our JupyterLab environment, please contact our support team. We can add them to our Docker image to avoid huge duplication and ensure consistency across all users.

In JupyterLab, you can install new packages or dependencies using the command line interface. Open a new terminal or console in JupyterLab, use the following package managers, and replace <package-name> with the name of the package you want to install.


  • Python:
    pip install <package-name>

    To install multiple packages at once, separate their names with a space.
    The files are installed to ".local/lib/python3.11/site-packages".

  • R:

    R --no-save <<< "pak::pkg_install(c('<package-name>'))"
    

    To install multiple packages at once, separate their names with a comma. The package manager ensures that any required dependencies are also installed automatically.
    The files are installed to ".local/share/R".

  • Ruby:
    gem install <package-name>
    

    To install multiple packages at once, separate their names with a space.
    The files are installed to ".local/share/gem".



Related Questions