2015-11-19 57 views
0

由於昨晚我的筆記本電腦崩潰(原因不明),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)時,我又回到了同樣的錯誤。

+0

追加一些日誌到你的問題會很好。 – diegoperini

+0

我有完全相同的問題。我試圖讓Spyder使用帶有nltk的virtualenv,並獲得相同的錯誤。刪除'.spyder2 /'並不是真正的解決方案,因爲它會重置所有Spyder設置,並且您又回到使用默認解釋器。你有沒有在這方面取得進展? – silentser

+0

@silentser - 我無法想象它。這個問題發生在我直接安裝的Spyder中。我最終在安裝過程中安裝了Anaconda並使用Spyder。現在不需要添加路徑到PYTHONPATH管理器,所以它工作正常。但是爲什麼另一個Spyder停止了這樣的工作,我仍然不知所措。祝你好運。 –

回答

0

有類似的問題,並能夠通過創建一個新的virtualenv與安裝相同的依賴關係解決它。 現在Spyder正在與PYTHONPATH合作指向lib/python2.7/site-packages的新環境。

相關問題