2

All of my JupyterLab extensions are reported as out of date, but I can't figure out how to bring them up to date.

When I run jupyter labextension list, I get:

[automata] ~/Documents/Projects/Coding/Python/automata (master *=) $ jupyter labextension list
JupyterLab v4.0.1
/Users/Rax/Documents/Projects/Coding/Python/venvs/automata/share/jupyter/labextensions
        jupyterlab_pygments v0.2.2 enabled  X (python, jupyterlab_pygments)
        nbdime-jupyterlab v2.2.0 enabled  X
        jupyter-matplotlib v0.11.3 enabled OK
        @jupyterlab/git v0.41.0 enabled  X (python, jupyterlab-git)
        @jupyter-widgets/jupyterlab-manager v5.0.7 enabled  X (python, jupyterlab_widgets)


   The following extensions are outdated:
        jupyterlab_pygments
        nbdime-jupyterlab
        @jupyterlab/git
        @jupyter-widgets/jupyterlab-manager
        
   Consider running "jupyter labextension update --all" to check for updates.

But running jupyter labextension update --all gives

(Deprecated) Updating extensions with the jupyter labextension update command is now deprecated and will be removed in a future major version of JupyterLab.

Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages 

and has no effect.

How do I get and install up to date versions of JupyterLab extensions?


Running jupyter --paths gives:

config:
    /Users/Rax/.jupyter
    /Users/Rax/Library/Python/3.11/etc/jupyter
    /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/etc/jupyter
    /usr/local/etc/jupyter
    /etc/jupyter
data:
    /Users/Rax/Library/Jupyter
    /Users/Rax/Library/Python/3.11/share/jupyter
    /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/share/jupyter
    /usr/local/share/jupyter
    /usr/share/jupyter
runtime:
    /Users/Rax/Library/Jupyter/runtime
orome
  • 45,163
  • 57
  • 202
  • 418
  • This might be a bit misleading - e.g. `@jupyterlab/git` is not outdated, at least not the version from `jupyterlab-git`; maybe you have multiple versions installed? Try: 1) Uninstall any extensions which were installed using `jupyter labextension` using `jupyter labextension uninstall extension_name` 2) update the extensions using `pip install -U extension_name` – krassowski May 31 '23 at 18:46
  • 1
    @krassowski Yeah I did that for every extension "JupyterLab cannot uninstall since it was installed outside of JupyterLab. Use the same method used to install this extension to uninstall this extension." – orome May 31 '23 at 18:48
  • @krassowski I think they're all installed using `pip` (as they should be) – orome May 31 '23 at 18:49
  • 1
    @krassowski Also tried a complete deletion and rebuild of the venv from scratch and ended up at the same place. – orome May 31 '23 at 18:52
  • You still may have another older copy of the extension in another place, outside of your venv. Use `jupyter --paths` – krassowski Jun 01 '23 at 20:41
  • @krassowski I'm not sure how to interpret the output of `jupyter --paths` ([added](https://stackoverflow.com/posts/76376413/revisions) to OP) – orome Jun 05 '23 at 14:07
  • In each folder listed under `data` there may be a folder called `labextensions`. Any of the `labextensions` folder which contains extensions or folders with extensions (e.g. `@jupyterlab/git` could be in `/Users/Rax/Library/Jupyter/labextensions/@jupyterlab/git`) - you can try (re)moving these folders (which is a descrutive action - backup first!) to see if this is the culprit – krassowski Jun 11 '23 at 14:43
  • @krassowski Deleting a `labextensions` folder results in no extensions, but adding them back following the install instructions for each puts be back in the same place. – orome Jun 12 '23 at 13:53
  • @krassowski No I've got [no extensions](https://stackoverflow.com/q/76790341/656912) – orome Jul 28 '23 at 18:43

0 Answers0