由于昨晚我的笔记本电脑崩溃(原因不明),Spyder无法连接到内核。我得到这个错误:(JSON文件的名称每次我试图启动一个IPython的控制台时间变化)Spyder将无法连接到内核/ iPython控制台
IOError: Could not find u'kernel-1809.json' in ['.', '~/Library/Jupyter/runtime']
这似乎并没有被相关matplotlib 1.5的问题,即我在这里看过其他地方 - 它使用1.4.3。
iPython(版本4.0.0)从命令行运行正常。
Mac 10.10.1(优胜美地)。 Spyder 2.3.7。 Python的64位2.7.10,QT 4.8.7 4.11.3达尔文
更新,包括日志
>>> /Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/nbformat/current.py:19: UserWarning: nbformat.current is deprecated.
- use nbformat for read/write/validate public API
- use nbformat.vX directly to composing notebooks of a particular version
ERROR: 3rd party plugin import failed for `p_pylint`
Traceback (most recent call last):
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/otherplugins.py", line 53, in get_spyderplugins_mods
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderplugins/p_pylint.py", line 23, in <module>
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderplugins/widgets/pylintgui.py", line 71, in <module>
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderplugins/widgets/pylintgui.py", line 61, in get_pylint_version
File "subprocess.pyc", line 710, in __init__
File "subprocess.pyc", line 1335, in _execute_child
OSError: [Errno 2] No such file or directory
Traceback (most recent call last):
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/externalconsole.py", line 925, in <lambda>
give_focus=give_ipyclient_focus))
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/externalconsole.py", line 1033, in register_ipyclient
give_focus=give_focus)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/ipythonconsole.py", line 836, in register_client
self.connect_client_to_kernel(client)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/ipythonconsole.py", line 1048, in connect_client_to_kernel
client.password)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/ipythonconsole.py", line 1017, in create_kernel_manager_and_client
cf = find_connection_file(connection_file)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/jupyter_client/connect.py", line 185, in find_connection_file
raise IOError("Could not find %r in %r" % (filename, path))
IOError: Could not find u'kernel-2018.json' in ['.', u'/Users/garyspatterson/Library/Jupyter/runtime']
**进一步更新**
我删除,PyQt4的(API第2版)我用户目录中.spyder2 /文件夹下的所有文件,重新打开Spyder,并且它能够连接到iPython控制台。到现在为止还挺好。麻烦的是,当我添加一个路径到PYTHONPATH管理器(所以我可以导入外部模块,如nltk)时,我又回到了同样的错误。
追加一些日志到你的问题会很好。 – diegoperini
我有完全相同的问题。我试图让Spyder使用带有nltk的virtualenv,并获得相同的错误。删除'.spyder2 /'并不是真正的解决方案,因为它会重置所有Spyder设置,并且您又回到使用默认解释器。你有没有在这方面取得进展? – silentser
@silentser - 我无法想象它。这个问题发生在我直接安装的Spyder中。我最终在安装过程中安装了Anaconda并使用Spyder。现在不需要添加路径到PYTHONPATH管理器,所以它工作正常。但是为什么另一个Spyder停止了这样的工作,我仍然不知所措。祝你好运。 –