Solving “500: Internal Server Error, nbconvert failed: xelatex not found in PATH”

I encountered the same issue. As people previously stated, the problem lies in that xlatex isn’t found in your PATH environment variable.

A solution that worked for me was to run the following from the notebook:

!export PATH=/Library/TeX/texbin:$PATH

Or in a command line simply:

export PATH=/Library/TeX/texbin:$PATH

And then run the export to pdf from a command line (within your virtual environment if there is one in place) as follows:

 jupyter nbconvert your_notebook.ipynb --to pdf

This should create a pdf of your notebook on the same directory it is running.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)