Open egorananyev opened 8 years ago
Unrecognized JSON config file version, assuming version 1
Hum... https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/727 may helps you.
Sorry for the delay!
According to the issue you linked, the version warning is harmless. In the other cases, it was not accompanied by failing to enable vim. However, the solution (disabling the version warning) was supposed to be implemented in the new release, and the fact that it doesn't seem to be in my case may provide a clue for why I'm failing to use vim. I don't know how though. Do you have other suggestions? Please let me know if you need more info.
Hum... I'm not sure but removing/renaming ~/.jupyter/nbconfig/notebook.json
may help? (I have no idea what is a corresponding file in Windows).
Just tried that, i.e., renamed notebook.json to notebook_bak.json. Unfortunately, it didn't help :/
How about jupyter nbextension enable vim_binding\vim_binding
while you are on Windows
In the description of the issue, I've written that this is the command that gives me the error message that I also included above. I am running it on Windows through babun (cygwin).
I have same problem while using cygwin and solved it after some analysis. The real problem is the line
mkdir -p $(jupyter --data-dir)/nbextensions
The data-dir
have a newline that got included into the created directory name which is 'jupyter'$'\r'
.
If you look in the windows explorer the name is jupyter
(the last character looks like a dot).
Lastly if you tried to tab complete the directory name you get jupyter^M
So the solution is to not use --data-dir
but be at %APPDATA%
and create jupyter/nbextensions
directory.
Oh and I don't think creating jupyter
directory is necessary because it is already there.
I believe this is a cygwin specific problem.
Now I am able to enable the vim_binding :).
Thanks! That's nearly impossible to notice.... Does the way @DancingQuanta suggest the issue? @egorananyev
Excellent, it's working! To summarize DancingQuanta, the jupyter directory name created by the mkdir command is incorrect ("jupyter^M" instead of "jupyter"). Moving the nbextensions from that directory to the already existing Roaming/jupyter directory resolves the issue.
For new installations, instead of creating this jupyter^M directory with the command, you should: $ cd /cygdrive/c/Users/YourUserName/AppData/Roaming/jupyter $ mkdir nbextensions $ cd nbextensions $ git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding $ jupyter nbextension enable vim_binding/vim_binding
Perhaps this could be included in the package documentation?
Great job @DancingQuanta for spotting this!
I opened an issue over at Jupyter about this to see if they could remove that last newline jupyter/notebook#1937.
Thanks! Hope the issue is fixed in the jupyter side....
Hello Friends:
I seem to have hit this issue on Fedora-28/Linux
. Oddly, I had this working fine (100% perfectly) once before, but I put jupyter away for about a year and upon return today vim
keystrokes weren't being respected. So I re-ran the following, and this time got the error (whereas I didn't originally):
From inside the nbextensions/ directory ...
user@fedora28$ ${JUPYTER_VENV_HOME}/bin/jupyter --version
4.4.0
user@fedora28$ ls -la vim_binding/
total 48
drwxr-xr-x 6 user user 4096 Nov 28 20:41 .
drwxr-xr-x 3 user user 4096 Nov 28 20:24 ..
drwxr-xr-x 8 user user 4096 Nov 28 20:24 .git
drwxr-xr-x 2 user user 4096 Nov 28 20:24 .github
drwxr-xr-x 3 user user 4096 Nov 28 20:24 lib
-rw-r--r-- 1 user user 11989 Nov 28 20:24 README.md
drwxr-xr-x 2 user user 4096 Nov 28 20:24 resource
-rw-r--r-- 1 user user 625 Nov 28 20:24 vim_binding.css
-rw-r--r-- 1 user user 2860 Nov 28 20:24 vim_binding.js
-rw-r--r-- 1 user user 174 Nov 28 20:24 vim_binding.yaml
user@fedora28$ ${JUPYTER_VENV_HOME}/bin/jupyter nbextension enable vim_binding/vim_binding
Enabling notebook extension vim_binding/vim_binding...
- Validating: problems found:
- require? X vim_binding/vim_binding
Note that ${JUPYTER_VENV_HOME}
is simply the jupyter
version that is inside a virtual environment I created for using jupyter notebooks.
Any ideas? Thank you in advance. :)
EDIT: I gave up trying to get this to work and went searching for an alternative. That search led me to JupyterLab which, according to its documentation, is the next-generation web-based user interface for Project Jupyter. It offers a vim key binding out of the box (among others) and is user selectable. I hope this helps.
My experience may help the issue of vim-binds extension being invalid after re-install.
One sentence version:
The vim-bind extension [@axlair/jupyterlab_vim] remained invalid after reinstall, however the jupyter labestension list
told me everything is fine.
Long story version:
I installed vim-binds extension at first.
Then I remove it (for some stupid reason...).
After that, I installed vim-binds extension again, and since then, the vim-binds remains invalid.
Even the jupyter labextension list
command told me the extension is enabled ok.
One sentence version: The extension can be successfully reinstalled and enabled again, by removing the extension from the list of Uninstalled core extensions.
Long story version:
Then I noticed that the extension was also listed in the Uninstalled core extensions.
So I cd
into the app dir (mine is C:\Users\[Username]\Anaconda3\share\jupyter\lab
).
Open the file of settings\build_config.json
.
And remove the extension name in the uninstalled_core_extensions session.
After that, re-open the jupyter-lab
server can automatically re-install the extension, and the program automatically re-install the extension, until everything went fine.
My best guess is that
Hence solved.
Summary
Enabling vim_binding at the end of install does not activate them, but throws a validation problem (see below) on Windows 10, Anaconda, Python 2.
Environment
Behavior
When running command:
jupyter nbextension enable vim_binding/vim_binding
Expected
Enabling vim_bindings.
Actual
Output:
The vim bindings do not work with Jupyter Notebook after this.
Step by step procedure
(Followed the installation instructions): $ mkdir -p $(jupyter --data-dir)/nbextensions $ cd $(jupyter --data-dir)/nbextensions $ git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding $ jupyter nbextension enable vim_binding/vim_binding
What you have done to solve the issue
Tried reinstalling, which did not solve the issue.