8

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?

gogasca
  • 9,283
  • 6
  • 80
  • 125
kawingkelvin
  • 3,649
  • 2
  • 30
  • 50
  • 1
    I'm trying to do this too because the `toc` extension won't install--needs a newer version of jupyterlab. – abalter Oct 05 '20 at 17:31
  • I'm trying just update jupyterlab in a terminal instance. According to [this](https://stackoverflow.com/questions/59867635/how-to-upgrade-google-cloud-ai-platform-jupyter-lab-to-python-3-7) you can update Python that way. – abalter Oct 05 '20 at 17:36
  • Here is my attempt. The error is so strange because that version definitely exists in the conda-forge channel. https://stackoverflow.com/questions/64214169/cant-update-jupyterlab-with-conda-on-google-cloud-ai-notebook – abalter Oct 05 '20 at 18:29
  • 3
    If you want to use a different JupyterLab version, you can create your own container using custom Container based instance: https://cloud.google.com/ai-platform/deep-learning-containers/docs/derivative-container. Upgrading JupyterLab directly is not supported. All the extensions and dependencies are tested with the JupyterLab version notebook is already shipped, unfortunately, we can't guarantee upgrade will work with all the other Notebook dependencies. – gogasca Oct 05 '20 at 20:24
  • 3
    A few months on, are there any plans to upgrade the default version of Jupyterlab any time soon? The version in AI Cloud Platform Notebooks is now a year and a half and two major versions out of date, and with all the cool new features in JupyterLab 3 it would be really great to ship with by default. – bracec May 06 '21 at 20:53
  • 1
    @gogasca the version used on google notebooks is 1.2.16, which is multiple years and two major versions old. Is there any plans of going to v3 soon? – Matsemann Jul 11 '21 at 11:28
  • 1
    Agree is quite old, we will upgrade to JL 3.x in the following weeks. Definitely in Q3 will be available. – gogasca Jul 12 '21 at 23:34
  • 1
    @gogasca Any news on timing of update? Thanks! – Craig Aug 03 '21 at 21:13
  • word of caution - i manually updated my jupyter lab to 3.x and it mostly works but i randomly have to rebuild jupyter lab as sudo every once in a while and i lost the nice extensions for git and google cloud stuff – william_grisaitis Aug 05 '21 at 18:32
  • 1
    @gogasca Sorry to keep pestering, but any update on timing of a JL 3.x bump? Looks like it's still on 1.2, which is super old now.... a large portion of extensions no longer work as they've become >=3.0 only (e.g., collapsible headings are no longer possible). – Craig Sep 01 '21 at 16:59
  • Is coming end of this month – gogasca Sep 01 '21 at 19:10
  • 1
    Thanks! Looking forward to it and appreciate your response :) – Craig Sep 02 '21 at 15:30
  • Yikes! Quite an old version. – Benjamin Atkin Sep 20 '21 at 18:12
  • The 1.x version has a branch, which has seen some maintenance, but that has dropped off. 1.2.21 was in August, 1.2.20 was in March, 1.2.19 was in February, and before that the last update was in September of 2020. – Benjamin Atkin Sep 20 '21 at 18:46
  • 1
    10 days left in Q3 - *Definitely in Q3 will be available* ;) – Benjamin Atkin Sep 20 '21 at 18:47
  • 2
    "Starting with our next Notebooks image release, all environments will include JupyterLab 3.0 by default" -- woo thanks @gogasca! – Craig Sep 27 '21 at 16:05

1 Answers1

1

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

william_grisaitis
  • 5,170
  • 3
  • 33
  • 40