【问题标题】:nbconvert to pdf not working in google colabnbconvert to pdf 在谷歌 colab 中不起作用
【发布时间】:2021-03-06 02:25:27
【问题描述】:

我可以使用 nbconvert to HTML 复制以下命令 from this stackoverflow thread:

%%shell
jupyter nbconvert --to html /PATH/TO/YOUR/NOTEBOOKFILE.ipynb

但是当我切换到 pdf 时,我收到以下错误消息:

CalledProcessError: Command 'jupyter nbconvert --to pdf myworkbook.ipynb' returned non-zero exit status 1.

从一些粗略的研究看来,nbconvert 对 google colab 的使用总是有点笨拙,但有谁知道这里到底发生了什么,以及可能的解决方法?我宁愿直接在 colab 中进行转换,而不是下载文件,打印为 pdf,然后获取输出。

【问题讨论】:

    标签: python google-colaboratory nbconvert


    【解决方案1】:

    事实证明,nbconvert convert to pdf 还有一些其他的依赖项没有安装在 google colab 中。这些包括 LateX 和 XeteX。从文档页面:

    https://nbconvert.readthedocs.io/en/latest/install.html#installing-pandoc

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-01
      • 2021-12-12
      • 2019-05-07
      • 2019-08-27
      • 2021-01-26
      • 1970-01-01
      • 1970-01-01
      • 2018-11-08
      相关资源
      最近更新 更多