Update JupyterLab on JupyterHub

Hi,

after an ubuntu update, my hub got completely destroyed. After messing around for quite some time, I did a complete reinstall.

In my presentation to promote Jupyter I have several Mermaid diagrams, which don’t render anymore. I found this article from February las year:

After the reinstall I have Hub 5.2.1 but only Lab 3.6.8

How do I update Lab on Hub without destroying anything?
I have drawio and slideshow installed.

Thanx for your input!

Marc

How have you setup JupyterHub (e.g. zero-to-jupyterhub, littlest jupyterhub, or manual install)? What Spawner are you using?

It depends on how the hub it setup how you update packages in the user environment. But in general, pip install --upgrade jupyterlab or conda update jupyterlab in the user environment ought to work.

Thank you!

I followed this instruction:

Spawnerwiese I did not change anything…

I did as stated, but for

jupyter lab --version

I now get:

Traceback (most recent call last):
File “/opt/jupyterhub/bin/jupyter-lab”, line 5, in
from jupyterlab.labapp import main
File “/opt/jupyterhub/lib/python3.12/site-packages/jupyterlab/labapp.py”, line 45, in
from .extensions import MANAGERS as EXT_MANAGERS
File “/opt/jupyterhub/lib/python3.12/site-packages/jupyterlab/extensions/init.py”, line 12, in
from .pypi import PyPIExtensionManager
File “/opt/jupyterhub/lib/python3.12/site-packages/jupyterlab/extensions/pypi.py”, line 74, in
“http://”: httpx.AsyncHTTPTransport(proxy=http_proxy_url),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/jupyterhub/lib/python3.12/site-packages/httpx/_transports/default.py”, line 296, in init
proxy = Proxy(url=proxy) if isinstance(proxy, (str, URL)) else proxy
^^^^^^^^^^^^^^^^
File “/opt/jupyterhub/lib/python3.12/site-packages/httpx/_config.py”, line 214, in init
raise ValueError(f"Unknown scheme for proxy URL {url!r}")
ValueError: Unknown scheme for proxy URL URL(‘URL removed’)
fett gedruckter Text

also there ist a similar error for

jupyter labextension list

:frowning:

I am completely lost again

:frowning::frowning::frowning:

but at least, “About JupyterLab” shows version 4.3.6…
Mermaid works now…

But what about the errors and the extensions?

:frowning:

and what does the proxy have to do with that?

same error also for

jupyter lab clean
jupyter lab build

The errors look like they might relate to your http proxy configuration. Do you have any proxy set up (http_proxy env, etc.)?

yes, absolutely!
But these were there all the time.
When I unset these

jupyter lab --version

shows

4.3.6

strange :frowning:

but what is even stranger is, when I install labextensions

jupyterlab-rise
jupyterlab-snippets
jupyterlab-drawio

I now only have

jupyter lab --version

3.6.8

So again the question:

How do you safely update jupyterlab on the hub?
I mean that an extension is not compatible with a new version of JupyterLab, I mean, this can happen. But what can I install and what not? And how can I prevent having some old version again?

you could just pip --upgrade everything with the additional --no-deps flag.
this way pip won’t care about the dependencies and upgrade everything.

after that use pip check to see what has broken requirements and act accordingly to your needs.

interesting, thank you!
But the main problem for me at the moment
seems to be to find out, what extensions I can install for jupyterlab.

When I installed drawio it blew me to an old jupyterlab version.
But how can I find out, if an extension is compatible with the installed version?

btw, ist this (jupyterhub) still the right category or ist this an issue of jupyterlab itself?