Micromamba: Cannot activate env because cannot initialize shell cmd.exe (corp env)
Author: oscar6echoCreated Dec 11, 2024Updated Jul 11, 2026
Labelswhere::windows
Troubleshooting docs
- My problem is not solved in the Troubleshooting docs
Anaconda default channels
- I do NOT use the Anaconda default channels (pkgs/* etc.)
How did you install Mamba?
Micromamba
Search tried in issue tracker
yes
Latest version of Mamba
- My problem is not solved with the latest version
Tried in Conda?
I do not have this problem with Conda, just with Mamba
Describe your issue
The problem takes place in Windows only on a corp config (ie. very constrained and somewhat opaque).
It is impossible to activate an env because it is impossible to initialize shell cmd.exe.
Attempt to initialize shell:
C:\Users\ACORPUSER>micromamba shell init --shell cmd.exe --root-prefix=%MAMBA_ROOT_PREFIX%
cmd.exe already initialized.
Enter admin mode to enable long paths support?: [y/N] N
Aborted.
warning libmamba Did not enable long paths support.Attempt to activate env:
C:\Users\ACORPUSER>micromamba activate work4
critical libmamba Shell not initialized
'micromamba' is running as a subprocess and can't modify the parent shell.
Thus you must initialize your shell before using activate and deactivate.
To automatically initialize all future (cmd.exe) shells, run:
$ micromamba shell init --shell cmd.exe --root-prefix=~/.local/share/mamba
If your shell was already initialized, reinitialize your shell with:
$ micromamba shell reinit --shell cmd.exe
Otherwise, this may be an issue. In the meantime you can run commands. See:
$ micromamba run --help
Supported shells are {bash, zsh, csh, posix, xonsh, cmd.exe, powershell, fish, nu}.Attempt to reinitialize shell:
C:\Users\ACORPUSER>micromamba shell reinit --shell cmd.exe --root-prefix=%MAMBA_ROOT_PREFIX%
The following arguments were not expected: cmd.exe --shell
Run with --help for more information.mamba info / micromamba info
C:\Users\ACORPUSER>echo %MAMBA_ROOT_PREFIX%
C:\Users\ACORPUSER/.conda/envs/mmbase
C:\Users\ACORPUSER>micromamba info
libmamba version : 2.0.4
micromamba version : 2.0.4
curl version : libcurl/8.8.0-DEV Schannel zlib/1.3.1
libarchive version : libarchive 3.7.2 zlib/1.3.1 liblzma/5.6.2 bz2lib/1.0.8 liblz4/1.9.4 libzstd/1.5.6
envs directories : C:\Users\ACORPUSER\.conda\envs
package cache : C:\Users\ACORPUSER\.conda\envs\mmbase\pkgs
C:\Users\ACORPUSER\.mamba\pkgs
C:\Users\ACORPUSER\AppData\Roaming\.mamba\pkgs
environment : base
env location : C:\Users\ACORPUSER\.conda\envs\mmbase
user config files : C:\Users\ACORPUSER\.mambarc
populated config files : C:\Users\ACORPUSER\.mambarc
C:\Users\ACORPUSER\.condarc
virtual packages : __win=10.0.22631=0
__archspec=1=x86_64
__cuda=12.2=0
channels : https://corp-artifactory.corp.internal/artifactory/ext-conda-forge-proxy/noarch
https://corp-artifactory.corp.internal/artifactory/ext-conda-forge-proxy/win-64
base environment : C:\Users\ACORPUSER\.conda\envs\mmbase
platform : win-64Logs
See aboveenvironment.yml
N/A~/.condarc
# this .condarc works: tested successfully with conda (from miniforge)
channel_alias: https://corp-artifactory.corp.internal/artifactory
channels:
- ext-conda-forge-proxy
env_dirs:
- c:\Users\ACORPUSER\.conda\envs
ssl_verify: c:\Users\ACORPUSER\bin\ca-bundle.crtSource: mamba-org/mamba