Manage your conda environment

This page describes how to manage a conda environment in yourVertex AI Workbench instance.

Overview

If you've added a conda environment to your Vertex AI Workbench instance,it appears as akernelin your instance's JupyterLab interface.

You might have added a conda environment to your instance to use a kernelthat isn't available in a default Vertex AI Workbench instance.This page describes how to modify and delete that kernel.

Open JupyterLab

  1. In the Google Cloud console, go to theInstances page.

    Go to Instances

  2. Next to your Vertex AI Workbench instance's name,clickOpen JupyterLab.

    Your Vertex AI Workbench instance opens JupyterLab.

Modify a conda kernel

Vertex AI Workbench instances come with pre-installed frameworks such as PyTorchand TensorFlow. If you need a different version, you can modify thelibraries by using pip in the relevant conda environment.

For example, if you want to upgrade PyTorch:

# Check the name of the conda environment for PyTorchcondaenvlist# Activate the environment for PyTorchcondaactivatepytorch# Display the PyTorch versionpython-c"import torch; print(torch.__version__)"# Make sure to use pip from the conda environment for PyTorch# This should be `/opt/conda/envs/pytorch/bin/pip`whichpip# Upgrade PyTorchpipinstall--upgradetorch

Delete a conda kernel

Some conda packages add default kernels to your environment when the packagesare installed. For example, when you install R, conda might also add apython3 kernel. This can cause a duplication of kernels in yourenvironment. To avoid duplicated kernels, delete the default kernelbefore you create a new kernel with the same name.

rm -rf /opt/conda/envs/CONDA_ENVIRONMENT_NAME/share/jupyter/kernels/python3

Troubleshoot

To diagnose and resolve issues related to managing a conda environment inyour Vertex AI Workbench instance, seeTroubleshootingVertex AI Workbench.

What's next

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.