人工智能--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
相关推荐
智慧物业老杨3 小时前
物业数字化落地思考:真正的转型,是底层数据秩序的重构
java·大数据·人工智能·微服务·系统架构
7177776 小时前
中小团队 DevOps 平台选哪家:2026 年主流平台对比与 Gitee 本土化方案解析
人工智能·gitee
武子康6 小时前
小智断网后还能做什么?沿一次唤醒看清设备与服务端的分工
人工智能·llm·agent
西安栈上月明软件科技6 小时前
从 Linux 0.01 到 AI 开源:星图邻的开源实践
人工智能·自然语言处理·架构·开源·fastapi
麻雀飞吧6 小时前
先判断工具用来学习、开发还是执行
人工智能·python
甲维斯6 小时前
ZCode:快来领“免费”3亿tokens和“Git打包服务”
人工智能
揽秀亭长6 小时前
视频转文字有哪些方法?在线AI、剪辑软件、本地对比
人工智能·音视频
RoboWizard7 小时前
三星和金士顿内存条哪个更适合游戏超频
大数据·人工智能
深圳市恒星物联科技有限公司7 小时前
轻量MCU设备通过OpenHarmony兼容性测评的全流程关键要点与实战踩坑经验
大数据·人工智能·物联网·鸿蒙
AI闲人8 小时前
企业 AI 最大的问题,不是数据不足,而是数据没有业务语义
人工智能·数字化·企业ai落地