question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python3 Kernel error after anaconda install

See original GitHub issue

I am unable to run jupyter notebook successfully, and am getting the error FileNotFoundError: [Errno 2] No such file or directory: '//anaconda/envs/py35/bin/python'. I have uninstalled anaconda and jupyter and reinstalled, but am still getting the same result.

How do I solve it?

Traceback (most recent call last):
  File "/Users/martin/anaconda/lib/python3.5/site-packages/notebook/base/handlers.py", line 458, in wrapper
    result = yield gen.maybe_future(method(self, *args, **kwargs))
  File "/Users/martin/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
    value = future.result()
  File "/Users/martin/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/Users/martin/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
    yielded = self.gen.throw(*exc_info)
  File "/Users/martin/anaconda/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 58, in post
    sm.create_session(path=path, kernel_name=kernel_name))
  File "/Users/martin/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
    value = future.result()
  File "/Users/martin/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/Users/martin/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
    yielded = self.gen.throw(*exc_info)
  File "/Users/martin/anaconda/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 73, in create_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "/Users/martin/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
    value = future.result()
  File "/Users/martin/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/Users/martin/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 282, in wrapper
    yielded = next(result)
  File "/Users/martin/anaconda/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "/Users/martin/anaconda/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "/Users/martin/anaconda/lib/python3.5/site-packages/jupyter_client/manager.py", line 243, in start_kernel
    **kw)
  File "/Users/martin/anaconda/lib/python3.5/site-packages/jupyter_client/manager.py", line 189, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "/Users/martin/anaconda/lib/python3.5/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "/Users/martin/anaconda/lib/python3.5/subprocess.py", line 950, in __init__
    restore_signals, start_new_session)
  File "/Users/martin/anaconda/lib/python3.5/subprocess.py", line 1544, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '//anaconda/envs/py35/bin/python'

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

16reactions
takluyvercommented, May 3, 2016

I’m guessing that you reinstalled your python2 kernelspec, but not the python3 one, and the notebook you’re getting from another user has python3 in the metadata. You’ll probably need to create or switch to a Python 3 environment, install ipykernel and run python -m ipykernel install --user again.

9reactions
soedrcommented, May 2, 2016

I get

Available kernels:
  python2    /Users/martin/Library/Jupyter/kernels/python2
  python3    /Users/martin/Library/Jupyter/kernels/python3

However, I reinstalled ipykernel using python2 -m pip install ipykernel and python2 -m ipykernel install --user and that seems to have solved the problem!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kernel Error in Jupyter Notebook on Anaconda 2019.03 for ...
The solution was to run the following command in the terminal: python -m ipykernel install --user ,. which, I believe installs the kernel....
Read more >
How to Fix Kernel Error in Jupyter Notebook
A kernel error occurs basically when you try opening a python 3 file in the wrong directory. The truth is Jupyter and Python...
Read more >
How to fix Kernel Error or broken Python in Jupyter Notebook
TL;DW BELOW! If you delete or upgrade your python version, you might get a Kernel Error when trying to use Jupyter Notebooks!
Read more >
What to do when things go wrong - The Jupyter Notebook
If Jupyter gives an error that it can't find notebook , check with pip or conda that the notebook package is installed. Try...
Read more >
Kernel Error – Jupyter Notebook - Tech……Answers
If you will type jupyter notebook on the terminal and run it then you will not find any environment except Python 3 and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found