How to update Jupyter Lab version for GCP AI Platform Notebook

1.2k Views Asked by At

I created a GCP AI Platform Notebook instance a while ago, and the version seemed to be too low for many extensions I am trying to install. I did a pip install upgrade jupyterlab and restarted the VM instance. When I clicked on OPEN JUPYTERLAB, I found that the update did not take effect.

What's the correct way of doing this?

1

There are 1 best solutions below

0
On

1 check how jupyter is set up

  • installation
conda list | grep jupyter
  • configuation files
jupyter --paths

2 stop the jupyter server with (as of 2022...)

sudo service jupyter stop

3 update jupyter

using the installation tool (conda or pip, probably conda) that installed it

4 start jupyter

sudo service jupyter start

5 check its status

sudo service jupyter status

note

you might have to edit a config file or two to make the jupyter server work. As of 2022, the vertex AI VMs run jupyter via the linux service thing. Check sudo service jupyter status to see how the VM is launching the jupyter server. I see /opt/conda/bin/python3.7 /opt/conda/bin/jupyter-lab --config=/home/jupyter/.jupyter/jupyter_notebook_config.py. depending on what you see in status, you might have to edit that file or something else (e.g. in one of the files revealed by jupyter --paths).

source: Troubleshooting Vertex AI Workbench