nebari-dev / nebari

🪴 Nebari - your open source data science platform
https://nebari.dev
BSD 3-Clause "New" or "Revised" License
268 stars 89 forks source link

[BUG] - Pdf export of jupyter notebooks is broken #2202

Open Adam-D-Lewis opened 6 months ago

Adam-D-Lewis commented 6 months ago

Describe the bug

image Exporting to pdf as shown in the image doesn't work.

Attempting to do so results in a new browser tab opening with the following message.

500 : Internal Server Error
The error was:

nbconvert failed: xelatex not found on PATH, if you have not installed xelatex you may need to do so. Find further instructions at https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex.

As a workaround, I created a conda environment with jupyter and nbconvert-all and was able to convert via the command line with xvfb-run -a jupyter nbconvert ExampleExportNotebook.ipynb --to qtpdf after activating the environment.

Expected behavior

A pdf document generated and downloaded

OS and architecture in which you are running Nebari

Linux

How to Reproduce the problem?

See above

Command output

No response

Versions and dependencies used.

No response

Compute environment

None

Integrations

No response

Anything else?

As a workaround,

dharhas commented 6 months ago

This needs xelatex in the jupyterlab environment. This isn't something we probably want to put in the base Nebari image. In the past, latex related files could balloon the docker image size. we would need to look into it.

with the jhub-apps launcher in Nebari 2024.1.1 we will potentially soon have the ability to have named-servers with custom jupyterlab versions running from different conda environments. This owuld make this more feasible.