mamba-org / gator

Conda environment and package management extension from within Jupyter
Other
260 stars 31 forks source link

Mamba not recognized on windows #119

Closed fcollonval closed 3 years ago

fcollonval commented 3 years ago

Description

The command used for detecting the version of mamba is not working on Windows:

from subprocess import Popen, PIPE

Popen(["mamba", "--version"], stdout=PIPE, stderr=PIPE).communicate()
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-6-8405acab7e6e> in <module>()
      1 from subprocess import Popen, PIPE
      2 
----> 3 Popen(["conda", "--version"], stdout=PIPE, stderr=PIPE).communicate()

C:\Users\freud\Miniconda3\envs\gator\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
    798                                 c2pread, c2pwrite,
    799                                 errread, errwrite,
--> 800                                 restore_signals, start_new_session)
    801         except:
    802             # Cleanup if the child failed starting.

C:\Users\freud\Miniconda3\envs\gator\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
   1205                                          env,
   1206                                          os.fspath(cwd) if cwd is not None else None,
-> 1207                                          startupinfo)
   1208             finally:
   1209                 # Child is launched. Close the parent's copy of those pipe

FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable