jupytext: Extension not loading in jupyterlab 3
In Jupyterlab 3.0.4 with Jupytext 1.9.1 on Ubuntu 20.04.1 LTS the filemanager does not appear to be loading. Specifically the log line that says the jupytext file manager loads in not showing up. I can use the console commands to pair a notebook but no additional files are saved. The GUI also does not show previously paired files as notebooks either.
I can use the most recent version of jupytext with jupyter notebook just fine. I can also downgrade to lab 2.2 and the old plugin and it works fine as well.
I have tried all variations of enabling and configuration files listed in the install documentation and nothing has worked. I am fairly sure there is a bug here but there’s no error message so it is a bit hard to say.
Let me know if there’s any more information I can provide.
Here’s a little bit of additional debug info:
g@g-ThinkPad-P51:~$ jupyter labextension list
JupyterLab v3.0.4
/home/g/.local/share/jupyter/labextensions
jupyterlab-jupytext v1.3.0 enabled OK (python, jupytext)
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
Other labextensions (built into JupyterLab)
app dir: /home/g/.local/share/jupyter/lab
Contents of .jupyter/jupyter_notebook_config.json:
{
"NotebookApp": {
"nbserver_extensions": {
"jupytext": true
}
}
}
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 6
- Comments: 28 (12 by maintainers)
The issue is solved for me with jupyter_core==4.9.1
@sbrunk , I confirm that I am able to reproduce the issue and your resolution.
On Ubuntu 20.04, I have run
With the above I do get the configuration files for Jupytext in
~/.local/etc/jupyterbut as you said, they are not effective because that path is not listed in
jupyter --paths:The workaround
cp -r $HOME/.local/etc/jupyter/* $HOME/.jupyter/does work.Another possibility seems to be
I think I’ll open an issue on the Jupyter project to see what they recommend (I’ll also ask if
${HOME}/.local/etc/jupyteris a standard config location, or not)I just ran into this issue as well after installing
jupytextalong withjupyterlaboutside of a virtual env via pip as a non-root Linux user (which implicitly sets the--useroption on apip install.This results in the modern directory based config to be put into
$HOME/.local/etc/jupyter, like this:But jupyter only looks for config in
$HOME/.jupyterand system paths, NOT in$HOME/.local/etc/jupyter(you can check withjupyter --paths). This is different in a conda env (and probably virtualenv) where jupyter also looks in/path-to-env/etc/jupyter.So in my case the workaround was just a
cp -r $HOME/.local/etc/jupyter/* $HOME/.jupyter/.It occurred to me that perhaps I should be putting the above line in .jupyter/jupyter_lab_config.py since I am running jupyter lab This finally made something happen:
I will try but I have to find the time…
Well done @sbrunk! Thank you for your help in solving this long standing issue.
Next week I will make sure I can now reproduce the issue (I guess a simple
pip install jupytexton a recent Ubuntu should do it?), and then I’ll add a mention of the fix (copy the config files at the right place) to the documentation.I think that you finally understood what happened. I do have $HOME/.local/etc/jupyter/ but I had not realized until now. Thanks for the message.
Hi @jarradh , thanks for reporting this issue. Could you please tell us what kind of icons you get for
.mdand.pyfiles? (if you get a notebook icon then it means that Jupytext’s contents manager is working OK, if not indeed you have the same issue as the one reported here).Also it is expected that you get the Jupytext sub menu in Jupyter Notebook only. In JupyterLab all that is available are the Jupyter Commands, under View / Activate Command Palette.
Note that you can compare what you get locally with the screenshot in the documentation, and also compare with
Arg this is becoming very technical… do you notice this?
This is something that is taken care of by the Jupytext server extension: https://github.com/mwouts/jupytext/blob/master/jupytext/__init__.py#L40-L42
Of course we could reproduce that in your config file - something like
But I think that a better advice would be to get the server extension working. Would you mind to create a new environment / jupyter config from scratch? Personally I like very much conda/mamba for this, I’d create an
environment.ymlfile with this content (at least):and run
(or
conda env ...if you don’t have mamba)