How to activate jupyterlab-vim for jupyter-lab-4.0.2?

I try to run the install command pip install jupyterlab-vim.

Result of executing jupyter labextension list:

  • messages:

    JupyterLab v4.0.2
    /opt/conda/share/jupyter/labextensions
            jupyterlab_pygments v0.2.2 enabled  X (python, jupyterlab_pygments)
            @axlair/jupyterlab_vim v0.16.0 enabled  X (python, jupyterlab_vim)  
    
    
       The following extensions are outdated:
            jupyterlab_pygments
            @axlair/jupyterlab_vim
            
       Consider running "jupyter labextension update --all" to check for updates.
    
    
  • picture of messages:

    enter image description here

From the result of X, it seems like something went wrong, but I can’t find the more detailed error message.

What I’ve tried:

  • The most relative source I can find is : How to get Vim editor extension working?, but I don’t think the solution fit for me, because I don’t use any virtual environment.
  • Once I downgrade jupyterlab to 3.2.4, the command pip install jupyterlab-vim work again.

What should I do to repair this issue?

My jupyter lab environment:

jupyter_client            8.3.0
jupyter_core              5.3.1
jupyter-events            0.6.3
jupyter-lsp               2.2.0
jupyter_server            2.7.0
jupyter_server_terminals  0.4.4
jupyterlab                4.0.2
jupyterlab-pygments       0.2.2
jupyterlab_server         2.23.0
jupyterlab-vim            0.16.0

Cross-posted here. Those coming upon this post may want to check there for pertinent information if not answered here.

The jupyterlab-vim extension (version 0.16) works with jupyterlab 3.6.5, but not jupyterlab 4. I suggest that you pin the version that works with one of the lines of shell code below and submit an issue at GitHub - jupyterlab-contrib/jupyterlab-vim: :neckbeard: Vim notebook cell bindings for JupyterLab.

pip install jupyterlab==3.6.5
conda install -yc conda-forge jupyterlab==3.6.5
mamba install -yc conda-forge jupyterlab==3.6.5

fyi, jupyterlab-vim has been updated and now works in jupyter lab 4.x

1 Like