mamba: mamba env create fails on Windows when using netrc
Calling mamba env create will fail on Windows if the .condarc file points to protected channels that have their auth info stored in a .netrc file.
This can be fixed by explicitly doing
set HOME=%USERPROFILE%
prior to running mamba env create, which leads me to believe that since mamba is calling directly into conda_env.cli.main it is bypassing some useful environmental management that conda does to help Windows operation suck less.
FWIW, mamba search and mamba install both work fine.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (5 by maintainers)
@jonashaag It looks like conda’s
session.pyimports theget_netrc_authfunction fromrequests.utilsand uses that. The relevant part of that function (from requests code on github) is:Additionally, in conda’s
main.py, there is this code snippet here, which sets the netrc file location in the maininfo_dict:In either case, the
~construct is used to set the home directory, and that expands toUSERPROFILEon Windows.