Closed oricou closed 3 years ago
Could you share more details, when does that happen?
Without any python link (so python is not a command):
% nbterm
Unhandled exception in event loop: File "/usr/local/lib/python3.8/dist-packages/kernel_driver/driver.py", line 96, in start self.kernel_process = await launch_kernel( File "/usr/local/lib/python3.8/dist-packages/kernel_driver/connect.py", line 73, in launch_kernel p = await asyncio.create_subprocess_exec( File "/usr/lib/python3.8/asyncio/subprocess.py", line 236, in create_subprocess_exec transport, protocol = await loop.subprocess_exec( File "/usr/lib/python3.8/asyncio/base_events.py", line 1630, in subprocess_exec transport = await self._make_subprocess_transport( File "/usr/lib/python3.8/asyncio/unix_events.py", line 197, in _make_subprocess_transport transp = _UnixSubprocessTransport(self, protocol, args, shell, File "/usr/lib/python3.8/asyncio/base_subprocess.py", line 36, in init self._start(args=args, shell=shell, stdin=stdin, stdout=stdout, File "/usr/lib/python3.8/asyncio/unix_events.py", line 789, in _start self._proc = subprocess.Popen( File "/usr/lib/python3.8/subprocess.py", line 854, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename)
Exception [Errno 2] No such file or directory: 'python' Press ENTER to continue...
The error message is different but it was what I had before I made the link and removed it!
I had a python directory in my ~/bin directory which is in the PATH. Whatever, the error is at the same time.
This looks more like a kernel issue. For instance, the ipykernel kernelspec in my environment is at ~/mambaforge/envs/nbterm-dev/share/jupyter/kernels/python3/kernel.json
:
{
"argv": [
"/home/david/mambaforge/envs/nbterm-dev/bin/python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"language": "python"
}
And it will use my Python interpreter at /home/david/mambaforge/envs/nbterm-dev/bin/python
.
Can you locate your kernelspec and post its content?
In /usr/local/share/jupyter/kernels/python3/kernel.json:
{
"argv": [
"python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"language": "python"
}
Replacing first python
by python3
works. Thanks.
I removed python link on my computer so I have to run python2 or python3 to avoid mistake. Could you look for python3 instead of python?
Exception [Errno 13] Permission denied: 'python'