Install dependencies

Vertex AI Workbench user-managed notebooks isdeprecated. On April 14, 2025, support for user-managed notebooks ended and the ability to create user-managed notebooks instances was removed. Existing instances will continue to function until March 30, 2026, but patches, updates, and upgrades won't be available. To continue using Vertex AI Workbench, we recommend that youmigrate your user-managed notebooks instances to Vertex AI Workbench instances.

After you create a user-managed notebooks instance, you might need toinstall software thatyour notebook depends on. You can install dependencies by adding installcommands to a file in your notebook or by using a terminalwindow.

An advantage of adding install commands to a file is that, when you sharea notebook, the commands to install the dependencies are saved with thenotebook and are available to users that you share the notebook with.

Install dependencies from a user-managed notebooks instance

To install Python packages from a user-managed notebooksinstance:

  1. In the Google Cloud console, go to theUser-managed notebooks page.

    Go to User-managed notebooks

  2. Select the instance where you want to install dependencies.

  3. ClickOpen JupyterLab.

  4. To add a notebook file, you can use the menu or the Launcher.

    Menu

    1. To add a new notebook file from the menu, selectFile > New > Notebook.

      Add a notebook file.

    2. In theSelect kernel dialog, select the kernel for your newnotebook, for example,Python 3, and then clickSelect.

      Your new notebook file opens.

    Launcher

    1. To add a new Python 3 notebook file from the Launcher, selectFile > New > Launcher.

    2. Click thePython 3 tile.

      Add a notebook file.

      Your new notebook file opens.

  5. Rename your new notebook file.

    Menu

    1. SelectFile > Rename notebook. TheRename file dialog opens.

    2. In theNew name field, changeUntitled.ipynb to somethingmeaningful, such asinstall.ipynb.

    3. ClickRename.

    Launcher

    1. Right-click theUntitled.ipynb tab and then clickRename notebook. TheRename file dialog opens.

    2. In theNew name field, changeUntitled.ipynb to somethingmeaningful, such asinstall.ipynb.

    3. ClickRename.

  6. Install dependencies as follows.

    When you open your new notebook, there is a default code cell where youcan enter code, in this case Python 3.

    To install themxnetdeep learning library in a Python 3 notebook, enter the followingcommand in the code cell:

    %pip install mxnet

    Add code to a notebook cell.

  7. Click the run button to run the install command.

    Click the run button.

  8. When installation is complete, selectKernel > Restart kernelto restart the kernel and ensure the library is available for import.

  9. SelectFile > Save notebook to save the notebook.

Install dependencies from a terminal

To connect to a terminal, you can use your JupyterLab notebook orSSH. To install Pythonpackages from a terminal:

  1. In the Google Cloud console, go to theUser-managed notebooks page.

    Go to User-managed notebooks

  2. Select the instance where you want to install dependencies.

  3. ClickOpen JupyterLab.

  4. To open a terminal window, you can use the menu or the Launcher.

    Menu

    To open a terminal window from the menu, selectFile > New > Terminal.

    Open terminal.

    The terminal window opens.

    Launcher

    1. To open a terminal window from the Launcher, selectFile > New > Launcher.

    2. InOther, click theTerminal tile.

      Open terminal.

      The terminal window opens.

  5. In the terminal window, enter the command to install the softwaredependency for your user-managed notebooks instance.

    To install themxnetdeep learning library for Python 3 notebooks, enter the followingcommand:

    pip3 install mxnet

    Add code to a terminal.

  6. When installation is complete, restart the kernel to make sure thelibrary is available for import. In every open notebook file in thesame user-managed notebooks instance, selectKernel > Restart kernel.

  7. SelectFile > Save notebook to save the notebook.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.