0

I use a jupyter save hook to convert my notebooks into different formats which is defined in /Users/corrie/.jupyter/jupyter_notebook_config.py. This was all working fine until I recently reinstalled my whole python environment (some environment stuff messed up). I use pyenv and pyenv-virtualenv to manage my python environments, I had a slightly different setup before using virtualenvwrapper as well, so the reinstall is probably not 100% clean...

The save hook was still there after reinstalling but I had to reinstall jupyter again in my new python setup. It doesn't look like a clean reinstall, as many of my old kernels are still there (based on old environments that I thought should be gone..). Anyway, jupyter lab works fine but it doesn't pick up on the save hook.

When I run jupyter --config-dir it outputs the correct folder /Users/corrie/.jupyter but it still doesn't recognize the save hook. I also tried explicitly setting JUPYTER_CONFIG_DIR to the config folder but nothing changed.

I also tried copying the config file to $PYENV_ROOT/versions/3.9.9/etc/jupyter/ (3.9.9 is the version I get when running pyenv which jupyter), but also nothing.

How can I fix this? Also, ideally is there a way to not have to install jupyter again in every new environment?

Corrie
  • 11
  • 2

2 Answers2

1

I found the issue: the newest version of Jupyter Lab changed the name of the config file. Renaming the config file from jupyter_notebook_config.py to either jupyter_lab_config.py or jupyter_server_config.py solved the issue.

See also this issue.

Corrie
  • 11
  • 2
0

+1 to @Corrie's answer, but in my case updating jupyter_notebook_config.py to jupyter_lab_config.py has no effect

Updating jupyter_server_config.py fixed the issue.

IPython          : 8.4.0
ipykernel        : 6.15.1
ipywidgets       : 7.7.0
jupyter_client   : 7.3.4
jupyter_core     : 4.11.1
jupyter_server   : 1.18.1
jupyterlab       : 3.3.2
nbclient         : 0.6.7
nbconvert        : 7.0.0
nbformat         : 5.4.0
notebook         : 6.4.10
qtconsole        : not installed
traitlets        : 5.3.0
ltken123
  • 36
  • 3