在安装一些新的第三方模块和“笔记本”后,我将“ipython”与“qtconsole”一起使用(它工作完美),它停止工作并且内核不断重新启动。
错误在这里:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/IPython/kernel/__init__.py", line 10, in <module>
raise ImportError(__doc__)
ImportError: IPython.kernel has been replaced by IPython.parallel.
The previous version of IPython's parallel library was located at this
location (IPython.kernel). It has been moved to the IPython.parallel
subpackage and has been refactored to use zeromq/pyzmq instead of twisted.
Please see INSERT URL for further details.
[IPythonQtConsoleApp] WARNING | kernel restarted
如何解决这个问题? 错误显示“请参阅插入 URL 以获取更多详细信息。”我在哪里可以找到这个“插入网址”??? 谢谢。
最佳答案
您安装了多个版本的 IPython,并且它变得困惑。 /usr/lib
中的版本是使用 apt
安装的,并且是旧版本(1.0 之前的版本)。
最短的解决方法(如果您可以使用)是apt-get remove ipython
,在您的系统上只留下一个 IPython。
这个问题最可能的原因是easy_install
,因为您说它是由安装另一个软件包引起的。当您已经使用 apt 安装了软件包时,easy_install 可能会错误地将 dist-packages 添加到 easy-install.pth 中。要检查这一点,请查看文件(如果存在):
~/.local/lib/python2.7/site-packages/easy-install.pth
/usr/local/lib/python2.7/dist-packages/easy-install.pth
如果有任何以 /usr/lib/python2.7/dist-packages
开头的条目,则应将其删除。
关于python - 安装新模块后 IPython 内核重新启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22515241/