Skip to main content

Converting Jupyter Notebooks

Project description

nbconvert

Jupyter Notebook Conversion

Google Group Build Status Documentation Status Documentation Status codecov.io

The nbconvert tool, jupyter nbconvert, converts notebooks to various other formats via Jinja templates. The nbconvert tool allows you to convert an .ipynb notebook file into various static formats including:

  • HTML
  • LaTeX
  • PDF
  • Reveal JS
  • Markdown (md)
  • ReStructured Text (rst)
  • executable script

Usage

From the command line, use nbconvert to convert a Jupyter notebook (input) to a a different format (output). The basic command structure is:

$ jupyter nbconvert --to <output format> <input notebook>

where <output format> is the desired output format and <input notebook> is the filename of the Jupyter notebook.

Example: Convert a notebook to HTML

Convert Juptyer notebook file, mynotebook.ipynb, to HTML using:

$ jupyter nbconvert --to html mynotebook.ipynb

This command creates an HTML output file named mynotebook.html.

Dev Install

Check if pandoc is installed (pandoc --version); if needed, install:

sudo apt-get install pandoc

Or

brew install pandoc

Install nbconvert for development using:

git clone https://github.com/jupyter/nbconvert.git
cd nbconvert
pip install -e .

Running the tests after a dev install above:

pip install nbconvert[test]
py.test --pyargs nbconvert

Resources

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nbconvert-5.4.1.dev0.tar.gz (542.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nbconvert-5.4.1.dev0-py2.py3-none-any.whl (407.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file nbconvert-5.4.1.dev0.tar.gz.

File metadata

  • Download URL: nbconvert-5.4.1.dev0.tar.gz
  • Upload date:
  • Size: 542.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.3

File hashes

Hashes for nbconvert-5.4.1.dev0.tar.gz
Algorithm Hash digest
SHA256 20b2654649739f659ee88c7316a8a3136ae06e0d7f4f4ea96c37c1e4fd1044b9
MD5 b9314c2a1b1d9508581f771c5fec2be2
BLAKE2b-256 d4db6ca3c381b1063cabc297beb22bc9687b1c8600589f0ab49db7850a33da77

See more details on using hashes here.

File details

Details for the file nbconvert-5.4.1.dev0-py2.py3-none-any.whl.

File metadata

  • Download URL: nbconvert-5.4.1.dev0-py2.py3-none-any.whl
  • Upload date:
  • Size: 407.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.3

File hashes

Hashes for nbconvert-5.4.1.dev0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 071b07ad316ec1fceb25ecf4ff53286238aabc3c1a501499f2f7bcc9714d1ea7
MD5 15f2159598774714ba832ec816619c7a
BLAKE2b-256 191f05bbb1078b2224a95375ddb05e35acc9e1792f629cf5abfe4967387597fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page