[Jupyter Notebook] Error "nbconvert failed: xelatex not found on PATH......" when exporting PDF

For Jupyter Notebooks that have not been specially configured, we often get the following error when exporting files to PDF:

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.


Reason for error: xelatex is not installed

(Note: In some cases, in addition to installing " xelatex", you also need to install" pandoc", but the Anaconda2-5.0.1above version has already installed pandoc by default, then you only need to install "xelatex")


Solution:

Step 1: Download and install the "Miktex" software

Download link: https://miktex.org/download
Insert picture description here


Step 2: Add the installation path of Miktex installed in the previous step to the environment variable

Miktex installation path: F:\MiKTeX\MiKTeX\miktex\bin\x64
Insert picture description here
Insert picture description here


Step 3: Restart Jupyter Notebook, open any "ipynb" file, and click "Download as"-"PDF via LaTeX(.pdf)"

Insert picture description here


Step 4: Next, N prompt boxes will pop up. The following menu prompts to install each package, each time you click "Install" to install, until this menu no longer pops up (you can uncheck the icon~)

Insert picture description here


Step 5: Click Download as"-"PDF via LaTeX(.pdf)" again, and then the PDF file will be exported in the download item of the current browser.


Guess you like

Origin blog.csdn.net/qq_45797116/article/details/113792722