0

I'm having trouble running python code on juypter notebook. The following error message appears when I click on Kernel. Does anyone have a clue of what's wrong? Thanks in advance!

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute result = await result File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tornado/gen.py", line 769, in run yielded = self.gen.throw(*exc_info) # type: ignore File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/services/sessions/handlers.py", line 69, in post model = yield maybe_future( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tornado/gen.py", line 762, in run value = future.result() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tornado/gen.py", line 769, in run yielded = self.gen.throw(*exc_info) # type: ignore File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/services/sessions/sessionmanager.py", line 98, in create_session kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tornado/gen.py", line 762, in run value = future.result() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tornado/gen.py", line 769, in run yielded = self.gen.throw(*exc_info) # type: ignore File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/services/sessions/sessionmanager.py", line 110, in start_kernel_for_session kernel_id = yield maybe_future( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tornado/gen.py", line 762, in run value = future.result() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/services/kernels/kernelmanager.py", line 176, in start_kernel kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs)) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jupyter_client/multikernelmanager.py", line 186, in start_kernel km.start_kernel(**kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jupyter_client/manager.py", line 341, in start_kernel self.kernel = self._launch_kernel(kernel_cmd, **kw) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jupyter_client/manager.py", line 249, in _launch_kernel return launch_kernel(kernel_cmd, **kw) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jupyter_client/launcher.py", line 132, in launch_kernel proc = Popen(cmd, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 947, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1819, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: '/Library/Frameworks/Python.framework/Versions/3.6/bin/python3' 
0

1 Answer 1

2

Using this answer from another thread, I solved my issue.

I simply had to update jupyter notebook kernel using

pip3 install ipykernel --upgrade python3 -m ipykernel install --user 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.