Questions tagged [nbconvert]

nbconvert is a tool for Jupyter Notebook conversions.

nbconvert is a tool for Jupyter Notebook conversions.

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:

Github: https://github.com/jupyter/nbconvert

Docs: https://nbconvert.readthedocs.io/en/latest/

298 questions
270
votes
15 answers

How to run an .ipynb Jupyter Notebook from terminal?

I have some code in a .ipynb file and got it to the point where I don't really need the "interactive" feature of IPython Notebook. I would like to just run it straight from a Mac Terminal Command Line. Basically, if this were just a .py file, I…
Vincent
  • 7,808
  • 13
  • 49
  • 63
125
votes
17 answers

Convert JSON IPython notebook (.ipynb) to .py file

How do you convert an IPython notebook file (json with .ipynb extension) into a regular .py module?
Nitesh Selkari
  • 1,367
  • 3
  • 9
  • 10
73
votes
6 answers

export notebook to pdf without code

I have a large notebook with a lot of figures and text. I want to convert it to a html file. However, I don't want to export the code. I am using the following command ipython nbconvert --to html notebook.ipynb But this option also exports the…
aloha
  • 4,554
  • 6
  • 32
  • 40
41
votes
3 answers

How to remove heading numbers in Jupyter during pdf conversion?

When I use the heading tags (# ##, etc) using markdown, they are always converted to numbered sections during pdf-latex conversion. How to indicate unnumbered headings in markdown in Jupyter Notebook (IPython)? I realize this can be done by adding a…
Ébe Isaac
  • 11,563
  • 17
  • 64
  • 97
41
votes
3 answers

Jupyter (IPython) notebook: Convert an HTML notebook to ipynb

I have converted a Jupyter/IPython notebook to HTML format and subsequently lost the original ipynb file. Is there a simple way to generate the original notebook file from the converted HTML file?
foglerit
  • 7,792
  • 8
  • 44
  • 64
29
votes
3 answers

nbconvert use '--allow-chromium-download'

I tried downloading a Jupyter Notebook as pdf by clicking on File -> Download as -> Pdf via pyppeteer. I get the below error while doing so: nbconvert failed: No suitable chromium executable found on the system. Please use…
Invictus
  • 4,028
  • 10
  • 50
  • 80
23
votes
3 answers

Stop jupyter notebook wrapping cell contents in pandas html table output

The pandas option max_colwidth controls how many characters will be included in the repr of a dataframe: import string, random import pandas as pd df = pd.DataFrame([''.join(random.choice(string.ascii_lowercase + ' ') for j in range(1000)) for i in…
mike
  • 4,901
  • 2
  • 19
  • 19
15
votes
5 answers

Convert Jupyter notebook into MS word document .doc?

In Jupyter Notebook, I am able to convert a notebook to pdf and HTML using nbconvert. However, there is no way to convert it into .doc(Word Document). Is there a way to convert it to MS Word keeping the same text highlights and table structure?
HARSHA VARDHAN
  • 153
  • 1
  • 1
  • 6
14
votes
4 answers

nbconvert failed: Pyppeteer is not installed to support Web PDF conversion. Please install `nbconvert[webpdf]` to enable

Getting error as "nbconvert failed: Pyppeteer is not installed to support Web PDF conversion. Please install nbconvert[webpdf] to enable." while trying to download jupyter notebook file (.ipynb) as a PDF file
Girish Shenoy
  • 429
  • 1
  • 4
  • 10
14
votes
8 answers

No template sub-directory with name 'lab' found in the following paths

I am running a python azure function which is running a jupyter notebook via the nbconvert API. This was working for a time, although without deploying new code I have started to get the following error: No template sub-directory with name 'lab'…
Liam Ferris
  • 1,786
  • 2
  • 18
  • 38
12
votes
3 answers

nbdev and 'coroutine' object is not subscriptable

I recently updated the nbdev version of an "old" project of mine (I made a new conda environment), and now automatic tests in github (the "Run tests" part of the build) are failing with a 'coroutine' object is not subscriptable error per notebook,…
manu
  • 1,333
  • 2
  • 11
  • 24
12
votes
4 answers

'Missing $ inserted' error message when converting jupyter notebook to pdf with nbconvert

When attempting to convert a jupyter notebook to pdf with the following command: jupyter nbconvert --to pdf "Search and Other Content Finding Features.ipynb" I'm getting an error message: ! Missing $ inserted.
fraxture
  • 5,113
  • 4
  • 43
  • 83
11
votes
2 answers

Exporting Jupyter notebook with plotly to html not displaying correctly when offline

I am using Jupyter lab, everything works fine within jupyter lab even when I am offline. However whenever I try to export the report to HTML. the plotly plots are not rendered. If I turn on my internet connection the plots are rendered, just…
Christian Andersen
  • 165
  • 1
  • 1
  • 8
11
votes
3 answers

Jupyter Notebook exported HTML dark color

I am using JupyterLab with light theme and when I exported my notebook as HTML I saw this: What I am expecting to see is something like this: any ideas of the setting ?
kyle chan
  • 353
  • 1
  • 3
  • 12
11
votes
1 answer

Nbconvert doesn't display styler dataframe from jupyter notebook

I'm using jupyter nbconvert --to pdf --TemplateExporter.exclude_input=True Scorecard.ipynb to export my notebook to a pdf. Everything runs fine, but when looking in the pdf the dataframes are shown as
user11924246
  • 174
  • 7
1
2 3
19 20