No puedo ejecutar Jupyter Notebook después de actualizar python en MacOS Sierra 10.12.5

1

Así que tuve python 3.5 instalado en mi MacOS Sierra y obtuve la notebook jupyter instalada a través de pip3 y funcionó correctamente. Recientemente, actualicé a python 3.6 y cada vez que intenté ejecutar una notebook jupyter e iniciar una nueva notebook, se produjo el error de Kernel con el siguiente mensaje:

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'

He intentado desinstalar python 3.6 e instalar python 3.5 a través de Homebrew . Pero obtuve este error cuando ejecuté jupyter notebook

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

No sé si hay algún conflicto entre las versiones de Python en mi macbook o Jupyter simplemente no funciona con Python 3.6

ACTUALIZACIÓN 1 : Intenté ejecutar brew doctor y aquí está el resultado

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.

Sin embargo, solo Python 2.7 está instalado en ese directorio en mi sistema. Y no estoy seguro de si está en conflicto con Python 3.6

    
pregunta DucCuong 05.07.2017 - 05:54

0 respuestas

Lea otras preguntas en las etiquetas