mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.65k stars 386 forks source link

Command Pallet and Launcher Gallery not working in Jupyter Lab after Jupytext Install #1170

Closed txoof closed 11 months ago

txoof commented 11 months ago

This issue is similar to Issue #807 in that after install, jupytext works, but none of the commands from the command pallet or gallery buttons appear.

I've installed jupyter lab and jupytext with pip3 in a virtual environment for my user under python 3.11 on raspbianOS (Debian Bookworm).

I have a jupytext.toml in the project root where I'm working that contains this:

formats = "ipynb,py:percent"

Opening a .py file works as expected. Updating the .py file also updates the .ipynb files. None of the other options appear to be available.

Version Information

$ pip show jupyterlab jupytext
Name: jupyterlab
Version: 4.0.9
Summary: JupyterLab computational environment
<SNIP>
</SNIP>
Name: jupytext
Version: 1.15.2
Summary: Jupyter notebooks as Markdown documents,

Log Output

Here's the log output from starting jupyter lab --ip=192.168.1.99 --no-browser

log.txt

I get the error below; installing jupyter_nbextensions_configurator resolves that issue, but then leads on to the following error:

[W 2023-11-24 11:25:55.661 ServerApp] jupyter_nbextensions_configurator | error adding extension (enabled: True): The module 'jupyter_nbextensions_configurator' could not be found (No module named 'jupyter_nbextensions_configurator'). Are you sure the extension is installed?
    Traceback (most recent call last):
      File "/home/pi/venv-python-3.11/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 321, in add_extension
        extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/pi/venv-python-3.11/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 185, in __init__
        self._load_metadata()
      File "/home/pi/venv-python-3.11/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 200, in _load_metadata
        raise ExtensionModuleNotFound(msg) from None
    jupyter_server.extension.utils.ExtensionModuleNotFound: The module 'jupyter_nbextensions_configurator' could not be found (No module named 'jupyter_nbextensions_configurator'). Are you sure the extension is installed?
[W 2023-11-24 11:30:57.931 ServerApp] jupyter_nbextensions_configurator | error adding extension (enabled: True): The module 'jupyter_nbextensions_configurator' could not be found (No module named 'notebook.base'). Are you sure the extension is installed?
    Traceback (most recent call last):
      File "/home/pi/venv-python-3.11/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 321, in add_extension
        extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/pi/venv-python-3.11/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 185, in __init__
        self._load_metadata()
      File "/home/pi/venv-python-3.11/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 200, in _load_metadata
        raise ExtensionModuleNotFound(msg) from None
    jupyter_server.extension.utils.ExtensionModuleNotFound: The module 'jupyter_nbextensions_configurator' could not be found (No module named 'notebook.base'). Are you sure the extension is installed?

Stuff I've tried

I can resolve the error(s) above by down-grading to notebook=6.4.12 as per this stackoverflow post, but that doesn't fix the overall problem.

Thanks in advance!

mwouts commented 11 months ago

Hi @txoof , we have a release candidate for the next version... and the Jupytext Menu is back! Would you like to give it a try - with pip install jupytext==1.16.0rc0 ? Let us know how it works for you. Thanks

txoof commented 11 months ago

Fantastic!

1.16.0rc0 works great! Problems solved!