Running Python 3 in Jupyter Notebook but getting kernel error - python-3.x

Here is the error log that I get when I click on Kernel Error:
Traceback (most recent call last):
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/tornado/web.py", line 1699, in
_execute result = await result
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-
packages/notebook/services/sessions/handlers.py", line 72, in post type=mtype))
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/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 "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/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 "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 209, in wrapper
yielded = next(result)
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-
packages/notebook/services/kernels/kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-
packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line
259, in start_kernel**kw)
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line 204,
in _launch_kernel return launch_kernel(kernel_cmd, **kw)
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/launcher.py", line
138, in launch_kernel proc = Popen(cmd, **kwargs)
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/Users/Brahmbha/opt/anaconda3/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory:
'/Users/Brahmbha/anaconda2/envs/ipykernel_py3/bin/python':
'/Users/Brahmbha/anaconda2/envs/ipykernel_py3/bin/python'

It looks like your jupyter notebook could be trying to use a python enviroment that has been moved or deleted.
Try this in cmd or anaconda:
python -m ipykernel install --user
See this thread for more:
https://github.com/jupyter/notebook/issues/4079

Related

Kernel issues on jupyter

Error Starting Kernel
Traceback (most recent call last):
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/tornado/web.py", line 1713, in _execute
result = await result
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/tornado/gen.py", line 776, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 72, in post
type=mtype))
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/tornado/gen.py", line 769, in run
value = future.result()
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/tornado/gen.py", line 776, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/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 "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/tornado/gen.py", line 769, in run
value = future.result()
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/tornado/gen.py", line 776, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/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 "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/tornado/gen.py", line 769, in run
value = future.result()
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/tornado/gen.py", line 234, in wrapper
yielded = ctx_run(next, result)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/utils.py", line 30, in wrapped
raise e
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/utils.py", line 27, in wrapped
return loop.run_until_complete(future)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/nest_asyncio.py", line 90, in run_until_complete
return f.result()
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/asyncio/futures.py", line 178, in result
raise self._exception
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/asyncio/tasks.py", line 223, in __step
result = coro.send(None)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 214, in _async_start_kernel
starter = ensure_async(km.start_kernel(**kwargs))
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/utils.py", line 30, in wrapped
raise e
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/utils.py", line 27, in wrapped
return loop.run_until_complete(future)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/nest_asyncio.py", line 90, in run_until_complete
return f.result()
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/asyncio/futures.py", line 178, in result
raise self._exception
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/asyncio/tasks.py", line 223, in __step
result = coro.send(None)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/manager.py", line 90, in wrapper
raise e
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/manager.py", line 82, in wrapper
out = await method(self, *args, **kwargs)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/manager.py", line 394, in _async_start_kernel
await ensure_async(self._launch_kernel(kernel_cmd, **kw))
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/utils.py", line 30, in wrapped
raise e
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/utils.py", line 27, in wrapped
return loop.run_until_complete(future)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/nest_asyncio.py", line 90, in run_until_complete
return f.result()
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/asyncio/futures.py", line 178, in result
raise self._exception
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/asyncio/tasks.py", line 223, in __step
result = coro.send(None)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/manager.py", line 311, in _async_launch_kernel
connection_info = await self.provisioner.launch_kernel(kernel_cmd, **kw)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/provisioning/local_provisioner.py", line 204, in launch_kernel
self.process = launch_kernel(cmd, **scrubbed_kwargs)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/launcher.py", line 170, in launch_kernel
raise ex
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/site-packages/jupyter_client/launcher.py", line 158, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/subprocess.py", line 775, in init
restore_signals, start_new_session)
File "/root/anaconda3/envs/TensorPy36/lib/python3.7/subprocess.py", line 1453, in _execute_child
restore_signals, start_new_session, preexec_fn)
BlockingIOError: [Errno 11] Resource temporarily unavailable
Permanent solution for this error

How to specify local shell for Fabric2/Paramiko/Invoke?

When trying to create a fabric2.Connection, Paramiko tries to invoke a local /bin/bash command:
$ fab2 db-shell
Traceback (most recent call last):
File "/nix/store/m2iyj18cifr4a1rvpfgphg7kfgsf2pj2-python3.9-fabric2-2.7.1/bin/.fab2-wrapped", line 9, in <module>
sys.exit(program.run())
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/program.py", line 384, in run
self.execute()
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/program.py", line 566, in execute
executor.execute(*self.tasks)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/executor.py", line 129, in execute
result = call.task(*args, **call.kwargs)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/tasks.py", line 127, in __call__
result = self.body(*args, **kwargs)
File "/home/username/project/fabfile.py", line 645, in db_shell
bastion_connection().run(
File "/home/username/project/fabfile_utils.py", line 141, in bastion_connection
conn = Connection(
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/fabric2/connection.py", line 403, in __init__
self.ssh_config = self.config.base_ssh_config.lookup(host)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/paramiko/config.py", line 223, in lookup
options = self._lookup(hostname=hostname)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/paramiko/config.py", line 250, in _lookup
or self._does_match(
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/paramiko/config.py", line 389, in _does_match
passed = invoke.run(exec_cmd, hide="stdout", warn=True).ok
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/__init__.py", line 48, in run
return Context().run(command, **kwargs)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/context.py", line 95, in run
return self._run(runner, command, **kwargs)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/context.py", line 102, in _run
return runner.run(command, **kwargs)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/runners.py", line 380, in run
return self._run_body(command, **kwargs)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/runners.py", line 431, in _run_body
self.start(command, self.opts["shell"], self.env)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/runners.py", line 1291, in start
self.process = Popen(
File "/nix/store/0zzvjh5gnz0ny7ckilzyn9hmg5lypszf-python3-3.9.13/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/nix/store/0zzvjh5gnz0ny7ckilzyn9hmg5lypszf-python3-3.9.13/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/bin/bash'
I've not been able to find anything in the docs about this yet.
I'm running fabric2==2.7.1, invoke==1.6.0, and paramiko==2.8.0 on NixOS stable 22.11.
Invoke currently defaults to /bin/bash, which is a known issue, since operating systems like Alpine and NixOS don't have that path. Fortunately we can specify a command in $PATH rather than manually looking it up, so adding the following to the Connection call does the trick: config=invoke.Config(overrides={"shell": "bash"}).

Kernel is DOA for Linux-based Jupyter notebook (and Jupyter lab)

So, after some trial-and-error, I managed to install Jupyter and its key GUIs (notebook and lab) using pip3. The jupyter notebook and the jupyterlab applications load fine. Whenever I try to create or access a notebook, however, the kernel is DOA. I tried restarting it without any luck. This is regardless of what language this kernel corresponds to (so it's not a language-specific problem). I encounter a similar question where the solution was ownership of the files in a certain folder, so I made sure that I maintain ownership of these files with my usual user (not root). Still, the problem persists. If you have any ideas as to how to resolve it, I'd be grateful. Cheers
Here is the error message I get, BTW:
Traceback (most recent call last):
File "/home/[my username]/.local/lib/python3.6/site-packages/tornado/web.py", line 1704, in _execute
result = await result
File "/home/[my username]/.local/lib/python3.6/site-packages/tornado/gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/[my username]/.local/lib/python3.6/site-packages/notebook/services/sessions/handlers.py", line 72, in post
type=mtype))
File "/home/[my username]/.local/lib/python3.6/site-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/home/[my username]/.local/lib/python3.6/site-packages/tornado/gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/[my username]/.local/lib/python3.6/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 "/home/[my username]/.local/lib/python3.6/site-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/home/[my username]/.local/lib/python3.6/site-packages/tornado/gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/[my username]/.local/lib/python3.6/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 "/home/[my username]/.local/lib/python3.6/site-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/home/[my username]/.local/lib/python3.6/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 "/home/[my username]/.local/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 184, in start_kernel
km, kernel_name, kernel_id = self.pre_start_kernel(kernel_name, kwargs)
File "/home/[my username]/.local/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 172, in pre_start_kernel
**constructor_kwargs
File "/home/[my username]/.local/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 83, in create_kernel_manager
km = kernel_manager_ctor(*args, **kwargs)
File "/home/[my username]/.local/lib/python3.6/site-packages/traitlets/config/configurable.py", line 73, in __init__
super(Configurable, self).__init__(**kwargs)
File "/home/[my username]/.local/lib/python3.6/site-packages/traitlets/traitlets.py", line 1000, in __init__
super_kwargs[key] = value
File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__
next(self.gen)
File "/home/[my username]/.local/lib/python3.6/site-packages/traitlets/traitlets.py", line 1131, in hold_trait_notifications
self.notify_change(change)
File "/home/[my username]/.local/lib/python3.6/site-packages/traitlets/traitlets.py", line 1176, in notify_change
c(change)
File "/home/[my username]/.local/lib/python3.6/site-packages/traitlets/traitlets.py", line 819, in compatible_observer
return func(self, change)
TypeError: _kernel_spec_manager_changed() takes 1 positional argument but 2 were given

ImportError: DLL load failed: %1 is not a valid Win32 application - kernel error at jupyter notebook

I am experiencing the following kernel error at jupyter notebook. This problem has started after having installed new version of python(3.8.2) and visual studio python package. I have tried to uninstall and reinstall anaconda but it isn't still working.
Traceback (most recent call last):
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 1703, in _execute
result = await result
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\handlers.py", line 72, in post
type=mtype))
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\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\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\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\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_client\multikernelmanager.py", line 158, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_client\manager.py", line 301, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_client\manager.py", line 248, in pre_start_kernel
self.write_connection_file()
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 474, in write_connection_file
kernel_name=self.kernel_name
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 138, in write_connection_file
with secure_write(fname) as f:
File "C:\ProgramData\Anaconda3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_core\paths.py", line 435, in secure_write
win32_restrict_file_to_user(fname)
File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_core\paths.py", line 361, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed: %1 is not a valid Win32 application.
I have solved the problem with executing the following code: pip install -- pywin32==227

kernel died when launching jupyter notebook

I have installed Python 3.6 with Anaconda 3.
The installation was successful however, when I launch a notebook, there is
kernel error immediatly with the following error message :
Traceback (most recent call last):
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\notebook\base\handlers.py", line 516, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1055, in run
value = future.result()
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\concurrent.py",
line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1055, in run
value = future.result()
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\concurrent.py",
line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Lionel\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\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1055,
in run
value = future.result()
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\concurrent.py",
line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Lionel\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\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1055, in run
value = future.result()
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\concurrent.py",
line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line 307,
in wrapper
yielded = next(result)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\notebook\services\kernels\kernelmanager.py", line 94, in
start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\jupyter_client\manager.py", line 257, in start_kernel
**kw)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\jupyter_client\manager.py", line 203, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\jupyter_client\launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\Lionel\Anaconda3\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Users\Lionel\Anaconda3\lib\subprocess.py", line 997, in
_execute_child
startupinfo)
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable
Note that before installing Anaconda 3, I uninstalled Anaconda 2 (with Python 2.7).
How can I fix this?
Finally I found a solution in the web :
I had to execute the following command :
python -m ipykernel install --user
Regards,
Lionel

Resources