Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This extension does not yet support the current version of JupyterLab. #87

Closed
idvorkin opened this issue Jun 30, 2019 · 25 comments
Closed

Comments

@idvorkin
Copy link

jupyterlab_vim stopped working on the latest. What can I do to help debug?

(jupyter) ➜  jupyter git:(master) ✗ jupyter-lab --version
1.0.0

(jupyter) ➜  jupyter git:(master) ✗ jupyter labextension install jupyterlab_vim


An error occured.
ValueError: This extension does not yet support the current version of JupyterLab.


Conflicting Dependencies:
JupyterLab              Extension      Package
>=1.0.0 <2.0.0          >=0.19.1 <0.20.0@jupyterlab/application
>=1.0.0 <2.0.0          >=0.19.1 <0.20.0@jupyterlab/notebook
See the log file for details:  /var/folders/tl/nmzk32m95_37fznfpg4gbj0j_fply8/T/jupyterlab-debug-m4hjrnl5.log

From the log file

npm notice === Tarball Details ===
npm notice name:          jupyterlab_vim
npm notice version:       0.10.1
npm notice filename:      jupyterlab_vim-0.10.1.tgz
npm notice package size:  6.7 kB
npm notice unpacked size: 29.8 kB
npm notice shasum:        6b7db06ff1e75d58264b1d3094309c9c19483abe
npm notice integrity:     sha512-qmoSsRJMN+CF7[...]V2x5KHfiIK9OA==
npm notice total files:   7
npm notice
jupyterlab_vim-0.10.1.tgz

Fetching URL: https://registry.npmjs.org/jupyterlab_vim
Fetching URL: https://registry.npmjs.org/jupyterlab_vim
Traceback (most recent call last):

  File "/Users/idvorkin/.local/share/virtualenvs/jupyter-ojjAUlJq/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

  File "/Users/idvorkin/.local/share/virtualenvs/jupyter-ojjAUlJq/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 82, in start
    ans = self.run_task()

  File "/Users/idvorkin/.local/share/virtualenvs/jupyter-ojjAUlJq/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 103, in run_task
    for arg in self.extra_args

  File "/Users/idvorkin/.local/share/virtualenvs/jupyter-ojjAUlJq/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 103, in <listcomp>
    for arg in self.extra_args

  File "/Users/idvorkin/.local/share/virtualenvs/jupyter-ojjAUlJq/lib/python3.7/site-packages/jupyterlab/commands.py", line 316, in install_extension
    return handler.install_extension(extension)

  File "/Users/idvorkin/.local/share/virtualenvs/jupyter-ojjAUlJq/lib/python3.7/site-packages/jupyterlab/commands.py", line 517, in install_extension
    info = self._install_extension(extension, tempdir)

  File "/Users/idvorkin/.local/share/virtualenvs/jupyter-ojjAUlJq/lib/python3.7/site-packages/jupyterlab/commands.py", line 1416, in _install_extension
    raise ValueError(msg)

ValueError: This extension does not yet support the current version of JupyterLab.


Conflicting Dependencies:
JupyterLab              Extension      Package
>=1.0.0 <2.0.0          >=0.19.1 <0.20.0@jupyterlab/application
>=1.0.0 <2.0.0          >=0.19.1 <0.20.0@jupyterlab/notebook

Exiting application: jupyter
@zaneselvans
Copy link

Would also love to see this extension updated for Jupyter 1.0. I feel lost in my notebooks without it!

@idvorkin
Copy link
Author

idvorkin commented Jul 4, 2019

Started but didn't get very far with #88

@dirkroorda
Copy link

I forked and checked whether it works regardless of the version. It did not. A real change has to be made.

@idvorkin
Copy link
Author

idvorkin commented Jul 6, 2019

FYI - I ended up pinning my version of jupyter-lab to avoid losing vim compatibility. I'm not sure what depends on jupyter-lab 1.0 thought:

jupyterlab  = "==0.35.6"  # Pin jupyter lab till vim is compatible

@benlindsay
Copy link

@idvorkin Out of curiosity, why/where do you use the syntax jupyterlab = "==0.35.6"? I've only seen it like jupyterlab==0.35.6 in requirements.txt or environment.yml

@idvorkin
Copy link
Author

idvorkin commented Jul 6, 2019

@benlindsay It's from a Pipfile used by pipenv. Pipenv is awesome in theory, except it's really sloooow in practice.

@remiOdite
Copy link

Hi ! I just installed jupyterlab, and I get the same error when I'm trying to add this extension. Is there any other solution than removing the pinning of the jupyterlab version ?

@wiseyoungbuck
Copy link

I can't believe how dependent on this extension I am. I'm really looking forward to this issue being resolved :).

@zaneselvans
Copy link

Me too... though I'm concerned we may need to figure out how to fix it on our own, as @jwkvam has hardly been active at all on Github since the last time the plugin was updated in November of last year. Has anybody else here worked on jupyterlab extensions before?

@dirkroorda
Copy link

It seems that the API that Jupyterlab offers to javascript libraries that operate on code cells has changed considerably when going to version 1.0.0. The vim bindings in this extension is really a vim-like editor based on codemirror. The work that has to be done is to re-glue the codemirror library to the jupyter code cell. I guess it is mainly a matter of renaming interfaces and functions in the API. Easy if you have written the code, far from trivial if you see it for the first time.

@ryantam626
Copy link

I can look into fixing it on Monday (vacation until then) if no one has done it by then

@willprice
Copy link
Contributor

It appears the CodeMirror vim keymap is now lazy loaded in JupyterLab. Previously it was always imported which this addon has relied on when setting the current cell's keymap.
By importing the keymap in the addon, we ensure it's loaded before setting the keymap of a cell thereby resolving the issue.

I've got a branch up over at https://github.com/willprice/jupyterlab-vim/tree/alpha1 which fixes this. Let me know if you have any issues.

To install...

$ git clone https://github.com/willprice/jupyterlab-vim.git
$ cd jupyterlab-vim
$ git checkout alpha1
$ jupyter labextension uninstall jupyterlab_vim
$ jlpm install
$ jlpm run build
$ jupyter labextension link .
$ jupyter labextension enable jupyterlab_vim

And run jupyter lab.

If you have any issues, please open up the browser console and copy and paste any stacktraces.

@zaneselvans
Copy link

Yay! It seems to work fine for me (on jupyterlab 1.0.2) Thank you so much for debugging this.

@willprice
Copy link
Contributor

@zaneselvans thanks for the confirmation it works :) it was fairly easy to debug once I'd figured out how extensions work in jupyterlab.

@louison
Copy link

louison commented Jul 14, 2019

Hi @zaneselvans,
It works for me on jupyterlab (1.02) within docker 👌.
Thank you very much

@dirkroorda
Copy link

@willprice Installation instructions worked and the result is: working vim bindings as before.
This is on Macos with a vanilla Python 3.7.3 and pip3-installed Jupyterlab.
Many thanks!

@caadr
Copy link

caadr commented Jul 15, 2019

Thanks a lot @willprice!

In ~8h of working with your patched version, i did not notice any issues.

Ubuntu 18.04, conda env with python 3.7.1, jupyter lab 1.0.2

@remiOdite
Copy link

Also works for me ! Thanks a lot @willprice !

@jwkvam
Copy link
Owner

jwkvam commented Jul 15, 2019 via email

@jwkvam
Copy link
Owner

jwkvam commented Jul 16, 2019

The new version has been pushed to npm. https://www.npmjs.com/package/jupyterlab_vim/v/0.11.0

This is identical to the PR willprice opened if you were using that. Upgrade with:

jupyter labextension install jupyterlab_vim

@jwkvam jwkvam closed this as completed Jul 16, 2019
@yelled1
Copy link

yelled1 commented Jul 16, 2019 via email

@jwkvam
Copy link
Owner

jwkvam commented Jul 17, 2019 via email

@dirkroorda
Copy link

I uninstalled from the extensions tab on the jupyterlab sidebar. That worked. Then I installed from the same bar. And that got me the update by jwkvam.

@sid-kap
Copy link

sid-kap commented Apr 14, 2020

Seems like the extension now doesn't support JupyterLab v2 (specifically jupyterlab==2.1.0). Does anyone know what it would take to make it work with v2? Have the APIs changed significantly, or would it be as simple as changing the bounds in package.json?

@louison
Copy link

louison commented Apr 14, 2020

Hi all,
Currently, there no release on a major branch for a v2 support but a merge request is pending.
I managed to get the plugin to work by following the instructions here:
#115 (comment)

I hop it will help you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests