Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python can';找不到pygments.lexers.BashLexer_Python_Python 2.7_Ipython_Jupyter_Pygments - Fatal编程技术网

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