mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.68k stars 346 forks source link

cmd script stops after calling micromamba create #3204

Open CDTR-MattConroy opened 5 months ago

CDTR-MattConroy commented 5 months ago

Troubleshooting docs

Anaconda default channels

How did you install Mamba?

Micromamba

Search tried in issue tracker

cmd stops execution

Latest version of Mamba

Tried in Conda?

I didn't try

Describe your issue

In the following script, after completing the micromamba create step, the rest of the script is skipped.

echo Creating python environment...
micromamba create python --name python --channel conda-forge --yes

echo Created python environment

The output of the script:

C:\git>test

C:\git>echo Creating python environment...
Creating python environment...

C:\git>micromamba create python --name python --channel conda-forge --yes
conda-forge/win-64                                          Using cache
conda-forge/noarch                                          Using cache

Transaction

  Prefix: C:\ProgramData\micromamba\envs\python

  Updating specs:

   - python

  Package                 Version  Build               Channel           Size
-------------------------------------------------------------------------------
  Install:
-------------------------------------------------------------------------------

  + libexpat                2.5.0  h63175ca_1          conda-forge     Cached
  + ucrt             10.0.22621.0  h57928b3_0          conda-forge     Cached
  + ca-certificates      2024.2.2  h56e8100_0          conda-forge     Cached
  + vc14_runtime      14.38.33130  h82b7239_18         conda-forge     Cached
  + vs2015_runtime    14.38.33130  hcb4865c_18         conda-forge     Cached
  + vc                       14.3  hcf57466_18         conda-forge     Cached
  + tk                     8.6.13  h5226925_1          conda-forge     Cached
  + libzlib                1.2.13  hcfcfb64_5          conda-forge     Cached
  + libffi                  3.4.2  h8ffe710_5          conda-forge     Cached
  + bzip2                   1.0.8  hcfcfb64_5          conda-forge     Cached
  + openssl                 3.2.1  hcfcfb64_0          conda-forge     Cached
  + libsqlite              3.45.1  hcfcfb64_0          conda-forge     Cached
  + xz                      5.2.6  h8d14728_0          conda-forge     Cached
  + tzdata                  2024a  h0c530f3_0          conda-forge     Cached
  + python                 3.12.2  h2628c8c_0_cpython  conda-forge     Cached
  + wheel                  0.42.0  pyhd8ed1ab_0        conda-forge     Cached
  + setuptools             69.1.1  pyhd8ed1ab_0        conda-forge     Cached
  + pip                      24.0  pyhd8ed1ab_0        conda-forge     Cached

  Summary:

  Install: 18 packages

  Total download: 0 B

-------------------------------------------------------------------------------

Transaction starting
Linking libexpat-2.5.0-h63175ca_1
Linking ucrt-10.0.22621.0-h57928b3_0
Linking ca-certificates-2024.2.2-h56e8100_0
Linking vc14_runtime-14.38.33130-h82b7239_18
Linking vs2015_runtime-14.38.33130-hcb4865c_18
Linking vc-14.3-hcf57466_18
Linking tk-8.6.13-h5226925_1
Linking libzlib-1.2.13-hcfcfb64_5
Linking libffi-3.4.2-h8ffe710_5
Linking bzip2-1.0.8-hcfcfb64_5
Linking openssl-3.2.1-hcfcfb64_0
Linking libsqlite-3.45.1-hcfcfb64_0
Linking xz-5.2.6-h8d14728_0
Linking tzdata-2024a-h0c530f3_0
Linking python-3.12.2-h2628c8c_0_cpython
Linking wheel-0.42.0-pyhd8ed1ab_0
Linking setuptools-69.1.1-pyhd8ed1ab_0
Linking pip-24.0-pyhd8ed1ab_0

Transaction finished

To activate this environment, use:

    micromamba activate python

Or to execute a single command in this environment, use:

    micromamba run -n python mycommand

C:\git>

mamba info / micromamba info

libmamba version : 1.5.6
     micromamba version : 1.5.6
           curl version : libcurl/8.2.1-DEV Schannel zlib/1.2.13
     libarchive version : libarchive 3.6.2 zlib/1.2.13 liblzma/5.4.3 bz2lib/1.0.8 liblz4/1.9.4 libzstd/1.5.5
       envs directories : C:\ProgramData\micromamba\envs
          package cache : C:\ProgramData\micromamba\pkgs
                          C:\Users\matt_\.mamba\pkgs
                          C:\Users\matt_\AppData\Roaming\.mamba\pkgs
            environment : None (not found)
           env location : -
      user config files : C:\Users\matt_\.mambarc
 populated config files :
       virtual packages : __win=0=0
                          __archspec=1=x86_64
                          __cuda=12.3=0
               channels :
       base environment : C:\ProgramData\micromamba
               platform : win-64

Logs

No response

environment.yml

No response

~/.condarc

No response

jaimergp commented 5 months ago

If this is in CMD, can you try calling CALL micromamba ... instead?

CDTR-MattConroy commented 5 months ago

Thanks @jaimergp that fixed it. Is there any reason why this needs to be the case? I find this somewhat surprising and unexpected?

jaimergp commented 5 months ago

There's a similar bug report in the conda/conda repo (sorry I'm on my phone and can't link). I assume it has to do with the shell integration using exit without /b somewhere.