人工智能--JupyterNoteBook 转换成 PDF

背景

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

python 复制代码
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

python 复制代码
conda install nbconvert

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

python 复制代码
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, MicroMamba 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、MicroMamba 或 Pixi。Conda forge 还包括多个 LaTeX 和其他与 Pandoc 相关的软件包(包括 pandoc-citeproc、pandoc-plot、通过 librsvg 的 rsvg-convert 等)。注意:conda forge 会安装静态链接的可执行文件。

python 复制代码
conda install -c conda-forge pandoc
相关推荐
智联视频超融合平台1 小时前
视频 AI 的误报之战,正在从调参数卷到改架构
人工智能·大模型·边缘计算·视频监控·安防
水如烟2 小时前
孤能子视角:智能的边界不在算法强弱,在可形式化性——从概率法到因果推理,选择池的边界一直在那里
人工智能
万里侯3 小时前
日志聚类之后别把 noise 扔掉:降噪应该改变视图,不抹掉证据
人工智能·微服务·ai·容器·k8s
澹锦汐3 小时前
纯前端秋日银杏与枫叶落叶色板智能聚类器:基于 K-Means 色彩量化与直方图自动配方提取
前端·人工智能·ai·语言模型·vue·react·k-means
71777710 小时前
国内 AI 研发效能工具怎么选:2026 年基于公开信息的选型框架与 Gitee 实践
人工智能·gitee
Csvn11 小时前
换供应商要改一遍代码?把模型接入收进一层网关(C04)
人工智能·aigc·agent
孟健11 小时前
开源AutoClip切直播:1小时48分出19段,整月API只花0.08元
人工智能·开源·aigc
翰墨之道11 小时前
AI日报:豆包工作ARR超20亿,GPT-6.2跑分与实测割裂
人工智能·gpt·数据挖掘
Maynor99612 小时前
Trymodel 使用介绍:一个平台同时用 Claude、GPT、Gemini 和 Grok
人工智能·gpt·ai·程序员·教程·claude·语音