Voila not working because it requires nbconvert >=6.4.5 while nbdev requires the same nbconvert to be <6

Hi,

I have been stuck trying to turn my Notebook into a Real App for more than a week and haven’t been able to find a solution here or anywhere else on the internet. It seems to be the same problem as this post from 2020 Inconsistent versions of Voila, nbconvert and nbdev.

My Environment

  • Paperspace Gradient Free GPU

The history

  • I saved a copy of all notebooks that I worked in so far.
  • Right now I am working in 02_prodcution.ipynb

The issue

Voila requires nbconvert >=6 while at the same time nbdev requires the same nbconvert to be <6.

I’ve tried getting it to work with nbconvert as version 5.6.1 and as 6.4.5, but run into errors in both cases.

When nbconvert is version 5.6.1 the notebooks work and the voila icon shows but I get a 404 when I try to open voila

To install nbconvert 5.6.1 I run pip install --upgrade jupyterhub.

The following is the output of three terminal commands when nbconvert is 5.6.1.

python3 -m pip check
voila 0.3.5 has requirement nbconvert<7,>=6.4.5, but you have nbconvert 5.6.1.
jupyter-server 1.16.0 has requirement nbconvert>=6.4.4, but you have nbconvert 5.6.1.

voila --version
ImportError: cannot import name ‘contextfilter’ from ‘jinja2’ (/opt/conda/lib/python3.7/site-packages/jinja2/init.py)

jupyter serverextension list
config dir: /opt/conda/etc/jupyter
voila.server_extension enabled
- Validating…
Error loading server extension voila.server_extension
X is voila.server_extension importable?

When I open a notebook in voila I get a 404. When I check the console error in my browser it says: Uncaught TypeError: Cannot read properties of undefined (reading ‘scrollHeight’)

When nbconvert is version 6.4.5 I get a 500 internal server error when opening any notebook.

To install nbconvert 6.4.5 I run pip install voila.

The following is the output of three terminal commands when nbconvert is 6.4.5.

python3 -m pip check
nbdev 1.1.23 has requirement nbconvert<6, but you have nbconvert 6.5.0.

voila --version
0.3.5

jupyter serverextension list
config dir: /opt/conda/etc/jupyter
voila.server_extension enabled
- Validating…
voila.server_extension OK

When I open any notebook I get a 500 internal server error. When I check the console error in my browser it says: Uncaught TypeError: Cannot read properties of undefined (reading ‘scrollHeight’)

Am I doing anything wrong? If someone can help me get voila to work I’d be extremely grateful.

Many thanks in advance.
Martin