'Anaconda/Jupyter notebook/500 : Internal Server Error/windows 10/python3

I am learning data science with python and R, in my first course i downloaded python3, R and Rstudio and in the current course i am learning using jupyter and downloaded anaconda to handle jupyter notebook. when i tried to convert .ipyth file to PDF i ran into the following error message

nbconvert failed: PDF creating failed, captured latex output:
Failed to run "xelatex .\notebook.tex -quiet" command:
This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020/W32TeX) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
! Undefined control sequence.
<*> .\notebook
              .tex -quiet
? 
! Emergency stop.
<*> .\notebook
              .tex -quiet
No pages of output.
Transcript written on ?.

Appreciate your support taking in consideration that i am new to programming



Solution 1:[1]

Unfortunately, there's very little maintenance of LaTeX in nbconvert -- LaTeX conversions are a complex beast and there's not someone keeping it fed overtime for all the many edge cases and build tool changes.

There is a new webpdf conversion using chromium to generate PDF files coming in 6.0, which trades off some of the flexibility of xelatex / pandoc for consistency with web renderings (and a new optional dependency).

(source: GitHub)

The maintainers are trying to get the last of issues resolved for a final release our of alpha for 6.0. There's just not many of us with a lot of free time to contribute.

BTW what worked for me is to first download the .ipynb file as ".Tex" file and then converting that .Tex file into .pdf

Solution 2:[2]

Open cmd and run the following code there:

pip install nbconvert==5.4.1

This solved my issue.

P.S. you may try the latest version.

Source: https://github.com/jupyter/notebook/issues/3629#issuecomment-482692594

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Khalid Saifullah
Solution 2 Sachin Motwani