Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Vertex AI Managed Notebooks conflicting dependencies issue.

Hi, 

Recently I tried to install a new package in my managed notbook instance of Vertex AI workbench. But I got an error stating that jupyterlab failed to open due to conflicting dependencies after the new package installation. Now I am unable to open and access the notebook files in the jupyterlab. Is there any way to access the files via CLI? Where are all the files in the managed notebook instance getting saved, is it in some google cloud storgae buckets? If anybody have any ideas rearding this, please do share.......

0 6 134
6 REPLIES 6

Hi @Archa,

Welcome to Google Cloud Community!

The package installation caused dependency conflicts, preventing JupyterLab from opening. You can still access your files via the Google Cloud CLI or SSH

You can access your files via the command line interface (CLI). Here's how:

1. Connect via SSH: The most direct way to access your files is through SSH. You can connect to your managed notebook instance using the gcloud command-line tool.

  • Replace PROJECT_ID with your Google Cloud project ID, ZONE with the specific Google Cloud zone where your instance is located, and INSTANCE_NAME with the name of your managed notebook instance.
  • Alternatively, you can connect via SSH through the Compute Engine page in the Google Cloud Console by clicking the SSH button next to your instance.

2. Navigate to your files: Once you're connected via SSH, your notebook files are typically stored in the /home/jupyter/ directory. You can use standard Linux commands like cd (change directory), ls (list files), and cp (copy files) to manage your files.

Your files are not directly stored in a Cloud Storage bucket by default. Instead, they reside on the persistent disk attached to your virtual machine instance. If you want to back up your files or move them to another instance, you can copy them to a Cloud Storage bucket:

  • Create a Cloud Storage Bucket: If you don't already have one, create a Cloud Storage bucket in the same project as your managed notebook instance.
  • Use gsutil cp : From the SSH terminal, use the gsutil cp command to copy your files to the bucket:
  • Replace BUCKET_NAME with your Cloud Storage bucket's name and PATH with the desired path within that bucket.

Troubleshooting the JupyterLab Issue: Conflicting dependencies are a common problem. Here are a few things you can try:

  1. Restart the instance: Sometimes, simply stopping and restarting the managed notebook instance can resolve dependency issues.
  2. Safe Mode: If you can get JupyterLab to start, try opening it in safe mode. This disables all extensions, which can help identify if an extension is causing the conflict.

  3.  Examine Logs: Look at the JupyterLab logs for more specific error messages related to the dependency conflict.

  4. Reinstall the problematic package: Try uninstalling and then reinstalling the package that caused the issue. Sometimes a clean install resolves conflicts. Use pip uninstall <package_name> followed by pip install <package_name> .

In addition, be aware that Managed Notebooks are being deprecated in favor of Vertex AI Workbench instances. You might want to consider migrating to a Vertex AI Workbench instance. You can find more details on managing access to Vertex AI Workbench instances here.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

Hi, Thanks for the response. 

Just wanted to know whether we can connect managed notebooks via SSH or it is possible only for user managed notebooks and instances of Vertex AI because I am not able to find the ZONE, only REGION is visible.

Also in the Compute Enginer console, only VMs created via user managed notebooks and instances are vissible. Does the managed notebook instances create a VM in the backend.

Hi @Archa,

Managed notebooks in Vertex AI Workbench do not provide direct SSH access like user-managed notebooks. Instead, they rely on a proxy-based connection for accessing JupyterLab. This is why you only see the region instead of a specific zone. Managed notebooks are designed to abstract away the underlying infrastructure.

Regarding VM creation:

  • User-managed notebooks create a visible Compute Engine VM, which you can access via SSH.

  • Managed notebooks, on the other hand, run on Google-managed infrastructure, meaning the VM is not directly exposed in the Compute Engine console.

If you need SSH access, you might consider switching to a user-managed notebook, which gives you more control over the underlying VM. For more information on SSH access for Vertex AI Workbench, please refer to this document.

Hope it helps!

Hi, One query I have regrading this is, Is there any way we can view or retrieve the data of a managed notebook instance or how can I acces the VM of managed notebooks.

Hi @Archa,

Managed notebooks in Vertex AI Workbench do not provide direct VM access like user-managed notebooks. Instead, they run on Google-managed infrastructure, meaning the underlying VM is not exposed in the Compute Engine console.

How to Access Data in a Managed Notebook Instance:

1. Use JupyterLab Interface

  • Open Vertex AI Workbench in the Google Cloud Console.

  • Navigate to your managed notebook instance and launch JupyterLab.

  • You can access and download files from the notebook environment.

2. Access Files via Cloud Storage

  • Managed notebooks often store files in Cloud Storage buckets.

  • Check if your notebook instance is linked to a Cloud Storage bucket where files are saved.

3. Use Vertex AI Workbench APIs

  • You can use Google Cloud APIs to retrieve files from the notebook instance. For Example: Use gcloud notebooks instances describe INSTANCE_NAME to check storage details.

You can refer to this documentation for more information on managing access to Vertex AI Workbench instances.

Hope it helps!

Hi, Thank you for the reply. 

Unfortunately there is no ZONE for managed notebooks, just REGION.

Also compute engine doesn't have the server name for the managed notebooks.