Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Converting too many notebooks at the same (multiprocessing) causes
zmq.error.ZMQError: Address already in use. The simple way to fix this issue is to limit the number of processes converting notebooks. It is suggested that you keep in within 3.Convert a Jupyter notebook to markdown format.
:::bash jupyter nbconvert --to markdown notebook.ipynbIt is recommended that you use the template provided by the Python library pretty-jupyter when converting a notebook to HTML . pretty-jupyter is currently the best template for Jupyter/Lab notebooks which provides beautiful and dynamic reports.
:::bash pip3 install pretty_jupyter jupyter nbconvert --to HTML --template pj notebook.ipynbYou can execute a notebook without converting it to a different format using the following command.
:::bash jupyter nbconvert --to notebook --execute mynotebook.ipynbThis will generate another notebook with the output inlined. You can use the option
--inplaceto overwrite the file inplace.:::bash jupyter nbconvert --to notebook --inplace --execute mynotebook.ipynbThere is no way to control the work directory of
jupyter nbconvertat this time. A recommended alternative is to manually change the directory in the notebook. It is possible to specify the output directory where things will be deployed. For more discussions, pleas refer to this issue.
Template¶
:::bash
jupyter nbconvert --template=nbextensions mynotebook.ipynbhttp://
:::bash
jupyter nbconvert --to python 'example.ipynb' --stdout --template=simplepython.tplLine Number in Code Blocks¶
:::bash
jupyter nbconvert a.ipynb --to html --Highlight2HTML.extra_formatter_options linenos=tableReferences¶
https://
https://
http://