2015-12-03 15 views
6

Quando ho aggiornato la mia versione Python dalla 3.4 alla 3.5 (su Mac El Capitan), ho reinstallato Jupyter ma quando lo eseguo e creo un nuovo notebook Python 3, mi dice immediatamente che c'è stato un errore di kernel e se clicco su questo, allora ottengo questo messaggio di errore:Notebook Jupyter rotto da Python 3.5

Traceback (most recent call last): File 
"/usr/local/lib/python3.5/site-packages/notebook/base/handlers.py", 
line 436, in wrapper 
    result = yield gen.maybe_future(method(self, *args, **kwargs)) File 
"/usr/local/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", 
line 56, in post 
    model = sm.create_session(path=path, kernel_name=kernel_name) File 
"/usr/local/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", 
line 66, in create_session 
    kernel_name=kernel_name) File "/usr/local/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", 
line 84, in start_kernel 
    **kwargs) File "/usr/local/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", 
line 109, in start_kernel 
    km.start_kernel(**kwargs) File "/usr/local/lib/python3.5/site-packages/jupyter_client/manager.py", 
line 244, in start_kernel 
    **kw) File "/usr/local/lib/python3.5/site-packages/jupyter_client/manager.py", 
line 190, in _launch_kernel 
    return launch_kernel(kernel_cmd, **kw) File "/usr/local/lib/python3.5/site-packages/jupyter_client/launcher.py", 
line 123, in launch_kernel 
    proc = Popen(cmd, **kwargs) File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", 
line 950, in __init__ 
    restore_signals, start_new_session) File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", 
line 1540, in _execute_child 
    raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 
'/usr/local/opt/python3/bin/python3.4' 

ho capito che l'aggiornamento 3,4-3,5 significava che i pacchetti sarebbero stati installati in luoghi diversi, ma non riesco a capire cosa sta cercando nei pacchetti Python 3.5 quando ho già eseguito pip3 installare jupyter di nuovo (e ho disinstallato/reinstallato diverse volte). qualcuno sa come aggiustare questo?

risposta

8

C'è un kernelspec avanzato per IPython che punta al tuo Python 3.4. Potete vedere kernelspecs esistenti con:

jupyter kernelspec list 

È possibile installare un nuovo IPython kernelspec con

ipython kernelspec install [--user] 
+0

Grazie mille :) tutto risolto ora! –

0

ho incontrato lo stesso problema come hai fatto tu. Ho disinstallato python 3 e reinstallato.

digitare Poi:

pip3 install jupyter ipython 

Questo mi ha dato l'accesso al notebook jupyter ma c'era ancora l'errore del kernel. Poi ho digitato:

python -m ipykernel install --user 

Ha risolto il mio problema.

Problemi correlati