Working on Windows 10. I installed Anaconda2 and jupyter. When I run jupyter notebook, the notebook launches but when I ask for new python2 kernel the kernel fails to start and I get below error. On continuum's troubleshoot assistance I verified and updated the system environment path variables and also ran 'conda install -f jupyter ipykernel' & 'jupyter notebook --generate-config'. But the kernel still fails to start. Please help. Thanks!
Traceback (most recent call last):
File "E:\Programs\Anaconda2\lib\site-packages\notebook\base\handlers.py", line 458, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "E:\Programs\Anaconda2\lib\site-packages\tornado\gen.py", line 1008, in run
value = future.result()
File "E:\Programs\Anaconda2\lib\site-packages\tornado\concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "E:\Programs\Anaconda2\lib\site-packages\tornado\gen.py", line 1014, in run
yielded = self.gen.throw(*exc_info)
File "E:\Programs\Anaconda2\lib\site-packages\notebook\services\sessions\handlers.py", line 58, in post
sm.create_session(path=path, kernel_name=kernel_name))
File "E:\Programs\Anaconda2\lib\site-packages\tornado\gen.py", line 1008, in run
value = future.result()
File "E:\Programs\Anaconda2\lib\site-packages\tornado\concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "E:\Programs\Anaconda2\lib\site-packages\tornado\gen.py", line 1014, in run
yielded = self.gen.throw(*exc_info)
File "E:\Programs\Anaconda2\lib\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 "E:\Programs\Anaconda2\lib\site-packages\tornado\gen.py", line 1008, in run
value = future.result()
File "E:\Programs\Anaconda2\lib\site-packages\tornado\concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "E:\Programs\Anaconda2\lib\site-packages\tornado\gen.py", line 282, in wrapper
yielded = next(result)
File "E:\Programs\Anaconda2\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "E:\Programs\Anaconda2\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "E:\Programs\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 243, in start_kernel
**kw)
File "E:\Programs\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "E:\Programs\Anaconda2\lib\site-packages\jupyter_client\launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "E:\Programs\Anaconda2\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "E:\Programs\Anaconda2\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
I'd guess that you created the kernelspec for an environment which you've now deleted or removed. Can you do jupyter kernelspec list to see where your kernelspecs are?
Thanks for your quick revert Thomas!! I updated the path variable in kernel.json and the kernel error is now gone :)
For the benefit of others, if any, struggling with this error...
It was:
"argv": [
"e:\programs\anaconda\python.exe",
and I changed it to:
"argv": [
"e:\programs\anaconda2\python.exe",
You guys are great
馃槑
Thank you. I have been going crazy with this. Uninstalled and installed everything and I still had the same issue. However, I had a twist to the solution. My kernel.json had the correct link to the python.exe location. However, when I ran the jupyter kernelspec list command, it pointed to a different kernel.json file. I guess I installed Anaconda too many times. Uninstalling Anaconda does not clean it up completely I guess.
Thank you so much @arpadthetall , @takluyver and @rkkarpuram , your comments helped me resolve my issue. I was previously using Python 2 and Python 3 kernels on jupyter, but had to uninstall and reinstall Anaconda3 but the kernels were still the old ones.
For those who find that they have different kernel.json files when running jupyter kernelspec list command, just go and update the kernel.json file on that location to the new path of your python.exe as specified in your latest installation of Anaconda3.
I changed the python path in kernel.json from
"argv": [
"C:/Users/NAME/Anaconda3/envs/ENV_NAME/bin/python",
to
"argv": [
"C:/Users/NAME/Anaconda3/envs/ENV_NAME/python",
as there was no bin directory
Thank you guys! This is my first day with Anaconda and Jupyter notebook, and your comments helped me to resolve the issue quickly!
Traceback (most recent call last):
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\tornado\web.py", line 1699, in _execute
result = await result
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(exc_info) # type: ignore
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
type=mtype))
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(exc_info) # type: ignore
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(kwargs)
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\jupyter_clientmultikernelmanager.py", line 110, in start_kernel
km.start_kernel(kwargs)
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\jupyter_clientmanager.py", line 240, in start_kernel
self.write_connection_file()
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 547, in write_connection_file
kernel_name=self.kernel_name
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 212, in write_connection_file
with secure_write(fname) as f:
File "C:\Users\tawfiq\Anaconda3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "C:\Users\tawfiq\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 102, in secure_write
with os.fdopen(os.open(fname, open_flag, 0o600), mode) as f:
PermissionError: [Errno 13] Permission denied: 'C:\Users\tawfiq\AppData\Roaming\jupyter\runtime\kernel-55b21fbf-c8dd-4ea9-8384-b6b771d34a2d.json'
Yet i do not understand how to resolve it
This is different than the original. See #5093.
I had this issue for awhile. The solution that worked for me is:
Close jupyter notebook and anaconda. And then run Anaconda again by run as administrator. And then launch jupyter notebook.
for future use you can change the properties of anaconda to run as administrator every time you launch.
I had this issue for awhile. The solution that worked for me is:
Close jupyter notebook and anaconda. And then run Anaconda again by run as administrator. And then launch jupyter notebook.
for future use you can change the properties of anaconda to run as administrator every time you launch.
Thank you it worked for me
I had this issue for awhile. The solution that worked for me is:
Close jupyter notebook and anaconda. And then run Anaconda again by run as administrator. And then launch jupyter notebook.
for future use you can change the properties of anaconda to run as administrator every time you launch.
it worked for me too.
thanks a ton!!
I had this issue for awhile. The solution that worked for me is:
Close jupyter notebook and anaconda. And then run Anaconda again by run as administrator. And then launch jupyter notebook.
for future use you can change the properties of anaconda to run as administrator every time you launch.
It worked for me too, Thank you!!
I've spent the whole day facing this issue, Thank you very much
Most helpful comment
I'd guess that you created the kernelspec for an environment which you've now deleted or removed. Can you do
jupyter kernelspec listto see where your kernelspecs are?