谷歌合作实验室笔记本PDF下载 [英] Google Co-laboratory notebook PDF download

查看:79
本文介绍了谷歌合作实验室笔记本PDF下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google合作实验室笔记本在文件"菜单中没有独立的Jupyter那样的下载为"下拉菜单项.如何以PDF格式下载笔记本?

Google Co-laboratory notebook doesn't have the "Download as" dropdown menu item in "File" menu like standalone Jupyter does. How to download the notebook as PDF?

推荐答案

您还可以直接在CO上运行mayurmadnani的解决方案.
因此,可以在CO中创建一个新的Python工作簿并将其连接到运行时.
使用以下命令将必要的软件包安装到虚拟机中:

You can also run the solution of mayurmadnani directly on CO.
Therefor create a new Python workbook in CO and connect it to a runtime.
Install the necessary packages into the virtual machine with:

!apt-get install texlive texlive-xetex texlive-latex-extra pandoc
!pip install pypandoc

安装您的Google驱动器以访问您的ipynb文件

Mount your google drive to get access to your ipynb files

from google.colab import drive
drive.mount('/content/drive')

我不得不将文件从驱动器复制到工作目录中,
因为该驱动器已/被安装为只读.

I had to copy the files from the drive to the working directory,
because the drive is/was mounted as read only.

!cp drive/My Drive/Colab Notebooks/Untitled.ipynb ./

然后您可以运行转换器.

Then you can run the converter.

!jupyter nbconvert --to PDF "Untitled.ipynb"

然后您可以在左侧面板中下载文件.

Then you can download the file in the left side panel.

这篇关于谷歌合作实验室笔记本PDF下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆