Python can';找不到pygments.lexers.BashLexer
我想用Python can';找不到pygments.lexers.BashLexer,python,python-2.7,ipython,jupyter,pygments,Python,Python 2.7,Ipython,Jupyter,Pygments,我想用 jupyter nbconvert example.ipynb --to slides 要从ipython笔记本生成jsreveal幻灯片,但我一直从lexers.py中得到一个错误: File "/usr/local/lib/python2.7/dist-packages/IPython/lib/lexers.py", line 37, in <module> from pygments.lexers import BashLexer, PythonLexer, Pyth
jupyter nbconvert example.ipynb --to slides
要从ipython笔记本生成jsreveal幻灯片,但我一直从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
在本例中,问题出在我的.bashrc中,它是为与paraview一起使用而设置的,如果我注释掉pythonpath,那么pygments可以正常工作
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