You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to execute a notebook from the command line and am getting the error "No kernel found that matches the current python executable," but I for sure have ipykernel in my environment. After some debugging I found the problem here. The problem is cmd = kernel_specs.argv[0] returns just python for conda (well, I'm using mamba) environments, at least with my setup. So then on line 39 it compares python to the executable path /home/me/mambaforge/envs/myenv/bin/python with os.path.samefile and skips it.
It looks like it'll take some playing around with the info in kernel_specs.argv to get a reliable absolute path to the executable which can be compared to sys.executable? The problem is, these don't appear to be very consistent:
Ubuntu (on WSL) 18.04
jupytext 0.15.1
jupyter_client 8.1.0
The text was updated successfully, but these errors were encountered:
kjohnsen
changed the title
kernelspec_from_language misses kernel for currently active environmentkernelspec_from_language misses kernel for conda environments
Oct 16, 2023
Hello, I'm trying to execute a notebook from the command line and am getting the error "No kernel found that matches the current python executable," but I for sure have ipykernel in my environment. After some debugging I found the problem here. The problem is
cmd = kernel_specs.argv[0]
returns justpython
for conda (well, I'm using mamba) environments, at least with my setup. So then on line 39 it comparespython
to the executable path/home/me/mambaforge/envs/myenv/bin/python
withos.path.samefile
and skips it.It looks like it'll take some playing around with the info in
kernel_specs.argv
to get a reliable absolute path to the executable which can be compared tosys.executable
? The problem is, these don't appear to be very consistent:System details:
The text was updated successfully, but these errors were encountered: