没有名为prompt_toolkit.enums的模块

时间:2016-12-19 01:39:30

标签: python enums kernel ipython jupyter

我试图通过命令行启动Jupyter笔记本并运行python脚本。起初,我可以通过终端启动它并运行脚本,但现在内核没有启动,它给了我这个错误 - " No module named prompt_toolkit.enums" 这是来自终端的整个消息 -

[I 20:33:38.256 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 151cba82-fb9a-4cfc-ba38-3df3f6f5bb61 restarted
Traceback (most recent call last):
  File "/Users/aparihar/anaconda2/lib/python2.7/runpy.py", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/Users/aparihar/anaconda2/lib/python2.7/runpy.py", line 111, in _get_module_details
    __import__(mod_name)  # Do not catch exceptions initializing package
  File "/Users/aparihar/anaconda2/lib/python2.7/site-packages/ipykernel/__init__.py", line 2, in <module>
    from .connect import *
  File "/Users/aparihar/anaconda2/lib/python2.7/site-packages/ipykernel/connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
  File "/Users/aparihar/anaconda2/lib/python2.7/site-packages/IPython/__init__.py", line 49, in <module>
    from .terminal.embed import embed
  File "/Users/aparihar/anaconda2/lib/python2.7/site-packages/IPython/terminal/embed.py", line 17, in <module>
    from IPython.terminal.interactiveshell import TerminalInteractiveShell
  File "/Users/aparihar/anaconda2/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 16, in <module>
    from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode
ImportError: No module named prompt_toolkit.enums

我在这里和github上发布了很多问题,但我无法解决这个问题。我甚至关闭所有会话,使用pip来安装枚举并重新启动Chrome和终端。有人可以帮忙吗?

谢谢!

0 个答案:

没有答案