-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
I have a pixi environment in the directory ~/Dropbox/.../ddr_1/. It has correct, updated pixi.toml and pixi.lock files. In this environment I have explicitly added (from default conda-forge channel) several packages, among them: spyder, ipython, python and spyder-kernels.
When I want to work within this environment, I use first to cd into one of its subdirectories:
$ cd programs/python
Then I launch the pixi shell, and afterwards call spyder, via:
$ pixi shell
$ spyder &
This used to work seamlessly, but now the following error shows up in the (IPython) console pane:
An error occurred while starting the kernel
The error is:
Traceback (most recent call last):
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/jupyter_core/utils/__init__.py", line 154, in wrapped
asyncio.get_running_loop()
~~~~~~~~~~~~~~~~~~~~~~~~^^
RuntimeError: no running event loop
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/spyder/plugins/ipythonconsole/widgets/main_widget.py", line 1442, in _connect_new_client_to_kernel
kernel_handler = self.get_cached_kernel(kernel_spec, cache=cache)
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/spyder/plugins/ipythonconsole/widgets/mixins.py", line 68, in get_cached_kernel
new_kernel_handler = KernelHandler.new_from_spec(kernel_spec)
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/spyder/plugins/ipythonconsole/utils/kernel_handler.py", line 413, in new_from_spec
kernel_manager.start_kernel(
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
stderr=PIPE,
^^^^^^^^^^^^
stdout=PIPE,
^^^^^^^^^^^^
env=kernel_spec.env,
^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/jupyter_core/utils/__init__.py", line 158, in wrapped
return loop.run_until_complete(inner)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/spyder/api/asyncdispatcher.py", line 442, in run_until_complete
return f.result()
~~~~~~~~^^
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/jupyter_client/manager.py", line 96, in wrapper
raise e
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/jupyter_client/manager.py", line 87, in wrapper
out = await method(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/jupyter_client/manager.py", line 435, in _async_start_kernel
kernel_cmd, kw = await self._async_pre_start_kernel(**kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/jupyter_client/manager.py", line 400, in _async_pre_start_kernel
kw = await self.provisioner.pre_launch(**kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/jupyter_client/provisioning/local_provisioner.py", line 198, in pre_launch
kernel_cmd = km.format_kernel_cmd(
extra_arguments=extra_arguments
) # This needs to remain here for b/c
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/jupyter_client/manager.py", line 307, in format_kernel_cmd
cmd = self.kernel_spec.argv + extra_arguments
^^^^^^^^^^^^^^^^^^^^^
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/spyder/plugins/ipythonconsole/utils/kernelspec.py", line 146, in argv
pixi_manifest, pixi_env = get_pixi_manifest_path_and_env_name(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
pyexec,
^^^^^^^
)
^
File "/home/orca/Dropbox/work/papers/collaboration/Theo_Adour/ddr_1/.pixi/envs/default/lib/python3.13/site‑packages/spyder_kernels/utils/pythonenv.py", line 82, in get_pixi_manifest_path_and_env_name
raise FileNotFoundError(
"No manifest file for your pixi environment was found!"
)
FileNotFoundError: No manifest file for your pixi environment was found!```
There is an accompanying message as well in the above pane, for instance, in the Variable Explorer tab, reading:
The current console has no active kernel, so there is no content to show here
This seems to be an issue with Spyder not being able to detect (now) the corresponding (I)Python kernel from the pixi environment. It used to work some time ago, when I had a former Spyder version 6.0.* and right now I have updated it to version 6.1.0, via pixi.
Some perhaps relevant versions are:
- IPython: 8.37.0
- Spyder version: 6.1.0 (conda)
- Python version: 3.13.7 64-bit
- Qt version: 5.15.15
- PyQt5 version: 5.15.11
- Operating System: Linux-6.8.0-84-generic-x86_64-with-glibc2.39
At last, I inform that this happens for all pixi environments I have tested.
If you could suggest some fixes, I would be very glad, because I have looked up through the internet and made up my mind to try and use Spyder for all my Python projects (another strong conternder seemed to be Positron, but, right now, Spyder seemed more stable and ready for direct use).
Thanks in advance.