Skip to content

Commit

Permalink
IPython console: Fix detecting Micromamba on Windows in kernelspec
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Dec 27, 2024
1 parent 3f64ee3 commit 235368c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spyder/plugins/ipythonconsole/utils/kernelspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,14 @@ def argv(self):
get_conda_env_path(pyexec)
])

if conda_exe.endswith('micromamba'):
# We need to use this flag to prevent conda_exe from capturing the
# kernel process stdout/stderr streams. That way we are able to
# show them in Spyder.
if conda_exe.endswith(('micromamba', 'micromamba.exe')):
kernel_cmd.extend(['--attach', '""'])
else:
# Note: We use --no-capture-output instead of --live-stream
# here because it works for very old Conda versions.
# here because it works for older Conda versions.
kernel_cmd.append('--no-capture-output')

kernel_cmd.extend([
Expand Down

0 comments on commit 235368c

Please sign in to comment.