将 IPython Notebooks 从 v4 (Jupyter) 转换回 good ol' v3

Converting IPython Notebooks from v4 (Jupyter) back to good ol' v3

有没有办法将新的笔记本版本(v4、Jupyter)转换回旧格式(v3)?在我的大学里,计算机池中的所有机器都配备了 v3(唉!),但我已经使用 Jupyter 有一段时间了。问题是,我们做很多基于笔记本的教学(它们非常适合教程等),但遗憾的是学生不能使用我的,因为他们无法在计算机上打开它们。

这可以在 nbconvertdocumentation 中找到:

jupyter nbconvert --to notebook --nbformat 3 mynotebook

will create a copy of mynotebook.ipynb in mynotebook.v3.ipynb in version 3 of the notebook format.

If you want to convert a notebook in-place, you can specify the ouptut file to be the same as the input file:

jupyter nbconvert --to notebook --nbformat 3 mynb --output mynb

Be careful with that, since it will replace the input file.