Skip to content

Commit

Permalink
Merge pull request #23360 from ccordoba12/fix-micromamba-on-windows
Browse files Browse the repository at this point in the history
PR: Fix detecting Micromamba on Windows for kernel activation (IPython console)
  • Loading branch information
ccordoba12 authored Dec 27, 2024
2 parents 90cf98f + 235368c commit 3ddbb71
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 3ddbb71

Please sign in to comment.