-
Notifications
You must be signed in to change notification settings - Fork 177
How to export a notebook in HTML
YY Ahn edited this page May 13, 2024
·
6 revisions
If you are using jupyter notebook (or jupyter lab) locally on your system, follow these simple steps:
- Simply download the file in
.html
format.- File -> Download as -> HTML (.html)
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
.ipynb
file 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