0

I'm trying to use

jupyter nbconvert example.ipynb --to slides

to generate a jsreveal slideshow from an ipython notebook, but I keep getting an error from lexers.py:

File "/usr/local/lib/python2.7/dist-packages/IPython/lib/lexers.py", line 37, in <module>
from pygments.lexers import BashLexer, PythonLexer, Python3Lexer
ImportError: cannot import name BashLexer

The other required lexers seem to be importing fine, I tried reinstalling pygments but it didn't make any difference. I'm using Ipython version 4.1.1 with python 2.7.6 on linux mint 17.3

Note A similar error seems to be manifesting for LatexFormatter:

return self.preprocess(nb,resources)
File "/usr/local/lib/python2.7/dist-packages/nbconvert/preprocessors/latex.py", line 43, in preprocess
from pygments.formatters import LatexFormatter
ImportError: cannot import name LatexFormatter
Thomas K
  • 39,200
  • 7
  • 84
  • 86
sean read
  • 305
  • 3
  • 14

1 Answers1

0

In this case the problem was in my .bashrc, which is set up for use with paraview, if I comment out the pythonpath then pygments works fine

sean read
  • 305
  • 3
  • 14