How to export a notebook in HTML - yy/dviz-course GitHub Wiki
Local
If you are using jupyter notebook (or jupyter lab) locally on your system, follow these simple steps:
- Simply download the file in
.htmlformat.- File -> Download as -> HTML (.html)
Google Colab
If you are using Google Colab, follow these steps to export your notebook to HTML format. First, you want to download the colab notebook as an ipynb file to your local computer.
- Download the
.ipynbfile to your desired location.- File -> Download -> Download .ipynb
Then, you want to use nbconvert tool (https://nbconvert.readthedocs.io/en/latest/) that allows you to convert a Jupyter notebook file to various other formats. Install it, and then run
$ jupyter nbconvert --to html filename.ipynb
If you are using a conda environment,
$ conda activate env_name
$ conda install nbconvert
$ jupyter nbconvert --to html filename.ipynb
With pip, if you have your virtual environment in dataviz/.venv directory and you downloaded the notebook file as dataviz/notebook.ipynb.
$ source .venv/bin/activate # activate virtual env
$ pip install nbconvert
$ jupyter nbconvert --to html notebook.ipynb