Impossibile avviare Jupyter Notebook dopo aver aggiornato python su MacOS Sierra 10.12.5

1

Quindi ho installato python 3.5 su MacOS Sierra e ho installato jupyter notebook tramite pip3 ed eseguito correttamente. Recentemente, ho aggiornato a python 3.6 e ogni volta che ho provato a eseguire jupyter notebook e avviare un nuovo notebook, l'errore del kernel è avvenuto con il seguente messaggio:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/notebook/base/handlers.py", line 516, in wrapper
    result = yield gen.maybe_future(method(self, *args, **kwargs))
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/usr/local/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/usr/local/lib/python3.6/site-packages/notebook/services/sessions/handlers.py", line 75, in post
    type=mtype))
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/usr/local/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/usr/local/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/usr/local/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/usr/local/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/usr/local/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 307, in wrapper
    yielded = next(result)
  File "/usr/local/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 94, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/jupyter_client/manager.py", line 257, in start_kernel
    **kw)
  File "/usr/local/lib/python3.6/site-packages/jupyter_client/manager.py", line 203, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "/usr/local/lib/python3.6/site-packages/jupyter_client/launcher.py", line 128, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1326, 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.5'

Ho provato a disinstallare python 3.6 e installare python 3.5 tramite Homebrew . Ma ho ricevuto questo errore quando eseguo jupyter notebook

zsh: /usr/local/bin/jupyter: bad interpreter: /usr/local/opt/python3/bin/python3.6: no such file or directory

Non so se ci sono conflitti tra le versioni di Python nel mio MacBook o Jupyter non funziona con Python 3.6

UPDATE 1 : Ho provato a eseguire brew doctor e qui è il risultato

Warning: Python is installed at /Library/Frameworks/Python.framework

Homebrew only supports building against the System-provided Python or a
brewed Python. In particular, Pythons installed to /Library can interfere with other software installs.

Tuttavia, solo python 2.7 è installato in quella directory sul mio sistema. E non sono sicuro che sia in conflitto con Python 3.6

    
posta DucCuong 05.07.2017 - 05:54
fonte

0 risposte

Leggi altre domande sui tag