对于没有经过特别配置的Jupyter Notebook,我们在导出文件为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.
报错原因:没有安装xelatex
(注意:有些情况下,除过要安装"xelatex"外,还需要安装“pandoc", 不过Anaconda2-5.0.1以上版本已经默认安装了pandoc,这时就只需要安装"xelatex")
解决办法:
第一步: 下载并安装“Miktex”软件
下载地址:https://miktex.org/download
第二步:把上一步安装的Miktex的安装路径添加到环境变量中
Miktex的安装路径: C:\Program Files\MiKTeX\miktex\bin\x64