New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

launching jupyter i get kernel error #2301

Closed
abdolrhman opened this Issue Mar 16, 2017 · 17 comments

Comments

Projects
None yet
10 participants
@abdolrhman

abdolrhman commented Mar 16, 2017

hey guys, i have this problem when i try to launch jupyter , the i got kernel error in the top right corner ,
i do tried to make python 2 kernel in jupyter so i followed some toturials about make environments then things start to get missy and errors showed up so i deleted them (envs) and kernel error is ON .
and when i click it i got this :

Traceback (most recent call last):
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\notebook\base\handlers.py", line 503, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "", line 3, in raise_exc_info
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "", line 3, in raise_exc_info
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\NasrAlDin\Anaconda3\lib\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 "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "", line 3, in raise_exc_info
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\NasrAlDin\Anaconda3\lib\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 "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "", line 3, in raise_exc_info
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\tornado\gen.py", line 285, in wrapper
yielded = next(result)
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 243, in start_kernel
**kw)
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\NasrAlDin\Anaconda3\lib\site-packages\jupyter_client\launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\NasrAlDin\Anaconda3\lib\subprocess.py", line 707, in init
restore_signals, start_new_session)
File "C:\Users\NasrAlDin\Anaconda3\lib\subprocess.py", line 990, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

thanks in advance and please help me , i reinstalled anacodna btw and still same error .

@abdolrhman

This comment has been minimized.

abdolrhman commented Mar 16, 2017

@abdolrhman

This comment has been minimized.

abdolrhman commented Mar 16, 2017

i found the soultion , the problem was , i made an environments then i deleted them , there were refrences for those envs ,
soultion : used this in cmd : python -m ipykernel install --user

@takluyver

This comment has been minimized.

Member

takluyver commented Mar 16, 2017

Yup, that's what I would have suggested. Thanks for working it out yourself!

For other people who might read this: you can see kernelspecs (which may contain references to deleted envs) by running:

jupyter kernelspec list

@takluyver takluyver closed this Mar 16, 2017

@takluyver takluyver added this to the No Action milestone Mar 16, 2017

@abdolrhman

This comment has been minimized.

abdolrhman commented Mar 16, 2017

brother @takluyver can you give me a complete steps to install python 2 kernel in notebook beside the python 3 , because the start of the problem got from doing wrong steps , thank you very much and by the way , my solution brought up from YOU , so thank you very much :)

@takluyver

This comment has been minimized.

Member

takluyver commented Mar 16, 2017

@paulmattheww

This comment has been minimized.

paulmattheww commented Apr 11, 2018

I know you closed this, but I've tried literally all day (and all recommendations on all the threads I could find).

Kernels:

Available kernels:
  ir         C:\Users\pmwash\AppData\Roaming\jupyter\kernels\ir
  python3    C:\Users\pmwash\AppData\Roaming\jupyter\kernels\python3

The kernel error is:
FileNotFoundError: [WinError 2] The system cannot find the file specified

I even uninstalled all Anaconda distributions and Python distributions, re-installed them, and still same issue. At a loss at this point. Any guidance? Thanks in advance!

@takluyver

This comment has been minimized.

Member

takluyver commented Apr 12, 2018

Try deleting that kernelspec path (the python3 one, assuming that's what is failing to launch). It should fall back on running the kernel in the same Python as the notebook server.

@paulmattheww

This comment has been minimized.

paulmattheww commented Apr 12, 2018

Thank you that worked. Now I need to reinstall all the libraries. Appreciated.

@Pratimhajra

This comment has been minimized.

Pratimhajra commented Apr 22, 2018

How to delete kernelspec path

@takluyver

This comment has been minimized.

Member

takluyver commented Apr 22, 2018

Find the path using jupyter kernelspec list. Then you can navigate to that in your file manager and delete it, or do it from the terminal (rm -r path/to/directory on Unix; if you're on Windows, you'll have to look it up)

@peoplecure

This comment has been minimized.

peoplecure commented Sep 29, 2018

i found the soultion , the problem was , i made an environments then i deleted them , there were refrences for those envs ,
soultion : used this in cmd : python -m ipykernel install --user

Thank you : )

@12krishna

This comment has been minimized.

12krishna commented Sep 30, 2018

That worked for me @abdolrhman you're a wizard !

@stephaniemdavis

This comment has been minimized.

stephaniemdavis commented Oct 5, 2018

@abdolrhman @takluyver : you solved my problem (error log attached).
kernel_error_log.txt

@stephaniemdavis

This comment has been minimized.

stephaniemdavis commented Oct 5, 2018

@peoplecure - The problem source as you define it seems to undermine the benefits of creating sandbox environments. Don't know why deleting one environment would affect the kernel operation.

@mbonix

This comment has been minimized.

mbonix commented Oct 10, 2018

i found the soultion , the problem was , i made an environments then i deleted them , there were refrences for those envs ,
soultion : used this in cmd : python -m ipykernel install --user

Thank you, it worked for me.

@miracode2033

This comment has been minimized.

miracode2033 commented Nov 10, 2018

Problem persists for me

$ jupyter kernelspec list
Available kernels:
python3 /home/miracode2033/anaconda3/share/jupyter/kernels/python3
$ rm -r /home/miracode2033/anaconda3/share/jupyter/kernels/python3
$ jupyter kernelspec list
Available kernels:
python3 /home/miracode2033/anaconda3/lib/python3.6/site-packages/ipykernel/resources
$ python -m ipykernel install --user
Installed kernelspec python3 in /home/miracode2033/.local/share/jupyter/kernels/python3
$

@berlala

This comment has been minimized.

berlala commented Dec 14, 2018

Thanks! I also get this problem for my envs. The cmd solve the problem and Kernal work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment