0

I have downloaded the ipython and ipython-notebook packages. The documentation of ipython says that I can run nbconvert to convert my notebooks to html/latex/etc. But am not able to run either nbconvert or ipython nbconvert.

 ~ ipython --version
0.13.1.rc2
 ~ ipython nbconvert
[TerminalIPythonApp] File not found: u'nbconvert'
 ~ 

(I don't know if this is the correct site to ask this.)

Kartik
  • 177
  • 2
  • 14
  • You Will need to be a little more precise. Which version of IPython. How do you try to run nbconvert? Do you have an error message? Etc.. – Matt Dec 25 '13 at 11:26
  • Sorry, I forgot to put that. I edited the question now. – Kartik Dec 25 '13 at 12:22

2 Answers2

1

Nbconvert is part of IPython only since 1.0. If it is not yet in Ubuntu repository, you could try to add Julian Taylor IPython PPA that should have more rencent version backported on Ubuntu. You will find information on how to add this PPA on your system on the PPA page. Be carefull, the PPA also contain bleeding edge version of IPython builded every night this is usually usable, but might not be what you like. I'm not a PPA/Ubuntu user myself so I cannot go much further into details.

Matt
  • 111
  • 4
1

I experienced a similar problem in Ubuntu Xenial 16.04. Error messages led me to three apps which are needed:

  • pygments
  • pandoc
  • nodejs

After installing those three, I was able to convert an ipython notebook to HTML format without an error message, using the command line string:

ipython nbconvert --to html foo.ipynb

I found a Python2 library file which calls nodejs:

/usr/lib/python2.7/dist-packages/IPython/nbconvert/filters/markdown.py

markdown.py contains a class named NodeJSMissing which throws up a ConversionException. But if nodejs remains uninstalled, Nbconvert will try to use Pandoc instead. In that sense, nodejs is optional.

noobninja
  • 548