人工智能--JupyterNoteBook 转换成 PDF

背景

我们希望将ipynb文件转换成pdf文件,需要如何处理?

10:24:52.677 [error] If you have not installed xelatex (TeX), you will need to do so before you can export to PDF. For further instructions, please see https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex.  
To avoid installing xelatex (TeX), you might want to try exporting to HTML and using your browser's "Print to PDF" feature.

解决方案

正常方法

安装MiKTex,找到对应的版本进行安装。
https://miktex.org/

便捷的方法

将所有的内容使用conda来进行管理
https://nbconvert.readthedocs.io/en/latest/install.html

conda install nbconvert

但是可能会出现如下报错:

nbconvert.utils.pandoc.PandocMissing: Pandoc wasn't found.
Please check that pandoc is installed:
https://pandoc.org/installing.html 

解决方法

You can install Pandoc using a Conda Forge tool, like Conda, [Micro]Mamba or Pixi. Conda forge also includes multiple LaTeX and other relevant packages for Pandoc (including pandoc-citeproc, pandoc-plot, rsvg-convert via librsvg etc.). Note: conda forge installs a statically-linked executable.
您可以使用 Conda Forge 工具安装 Pandoc,例如 Conda、[Micro]Mamba 或 Pixi。Conda forge 还包括多个 LaTeX 和其他与 Pandoc 相关的软件包(包括 pandoc-citeproc、pandoc-plot、通过 librsvg 的 rsvg-convert 等)。注意:conda forge 会安装静态链接的可执行文件。

conda install -c conda-forge pandoc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值