找不到pygments.lexers.BashLex

2024-09-26 17:55:15 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着用

jupyter nbconvert example.ipynb --to slides

从ipython笔记本生成jsreveal幻灯片,但我一直从lexers.py公司名称:

^{pr2}$

其他所需的lexer似乎导入良好,我尝试重新安装pygments,但没有任何区别。我在LinuxMint17.3上使用iPython4.1.1版和Python2.7.6版

注意,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

Tags: topyimportpygmentsexampleipython笔记本jupyter

热门问题