Hiding the .condarc file on Windows causes PermissionError
Checklist
- I added a descriptive title
- I searched open reports and couldn't find a duplicate
What happened?
Conda doesn't read/write to the .condarc file if it's hidden (windows, user home directory, hiding files using file explorer).
conda config --set auto_activate_base false
for example results in
CondaError: Cannot write to condarc file at C:\Users\crystallikelaw\.condarc
Caused by PermissionError(13, 'Permission denied')
Issue persists even when the anaconda prompt is opened as admistrator. I have no issues editing the file with notepad. Issue persists even when I delete the file and recreate it with the conda config command, assuming I hide it in explorer.
Conda Info
active environment : base active env location : C:\Code\Miniconda3 shell level : 1 user config file : C:\Users\crystallikelaw\.condarc populated config files : C:\Users\crystallikelaw\.condarc conda version : 22.11.1 conda-build version : not installed python version : 3.9.15.final.0 virtual packages : __archspec=1=x86_64 __win=0=0 base environment : C:\Code\Miniconda3 (writable) conda av data dir : C:\Code\Miniconda3\etc\conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/win-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/noarch package cache : C:\Code\Miniconda3\pkgs C:\Users\crystallikelaw\.conda\pkgs C:\Users\crystallikelaw\AppData\Local\conda\conda\pkgs envs directories : C:\Code\Miniconda3\envs C:\Users\crystallikelaw\.conda\envs C:\Users\crystallikelaw\AppData\Local\conda\conda\envs platform : win-64 user-agent : conda/22.11.1 requests/2.28.1 CPython/3.9.15 Windows/10 Windows/10.0.19045 administrator : False netrc file : None offline mode : False
Conda Config
==> C:\Users\crystallikelaw\.condarc <== create_default_packages: - ipython - jupyter - ipython - ipykernel - numba - pandas - numpy - mamba channel_priority: strict channels: - conda-forge - defaults (base) C:\Users\crystallikelaw>
Conda list
# packages in environment at C:\Code\Miniconda3: # # Name Version Build Channel brotlipy 0.7.0 py39ha55989b_1005 conda-forge bzip2 1.0.8 h8ffe710_4 conda-forge ca-certificates 2022.12.7 h5b45459_0 conda-forge certifi 2022.12.7 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py39h68f70e3_3 conda-forge charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge conda 22.11.1 py39hcbf5309_1 conda-forge conda-package-handling 2.0.2 pyh38be061_0 conda-forge conda-package-streaming 0.7.0 pyhd8ed1ab_1 conda-forge console_shortcut 0.1.1 4 defaults cryptography 38.0.4 py39hb6bd5e6_0 conda-forge fmt 9.1.0 h181d51b_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge krb5 1.20.1 heb0366b_0 conda-forge libarchive 3.5.2 habf0b7a_3 conda-forge libcurl 7.86.0 h68f0423_2 conda-forge libffi 3.4.2 h8ffe710_5 conda-forge libiconv 1.17 h8ffe710_0 conda-forge libmamba 1.1.0 hd18bbca_2 conda-forge libmambapy 1.1.0 py39h608c70e_2 conda-forge libsolv 0.7.23 h12be248_0 conda-forge libsqlite 3.40.0 hcfcfb64_0 conda-forge libssh2 1.10.0 h9a1e1f7_3 conda-forge libxml2 2.10.3 hc3477c8_0 conda-forge libzlib 1.2.13 hcfcfb64_4 conda-forge lz4-c 1.9.3 h8ffe710_1 conda-forge lzo 2.10 he774522_1000 conda-forge mamba 1.1.0 py39hca8391b_2 conda-forge menuinst 1.4.19 py39hcbf5309_1 conda-forge openssl 3.0.7 hcfcfb64_1 conda-forge pip 22.3.1 pyhd8ed1ab_0 conda-forge pluggy 1.0.0 pyhd8ed1ab_5 conda-forge powershell_shortcut 0.0.1 3 defaults pybind11-abi 4 hd8ed1ab_3 conda-forge pycosat 0.6.4 py39ha55989b_1 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyopenssl 22.1.0 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyh0701188_6 conda-forge python 3.9.15 h4de0772_0_cpython conda-forge python_abi 3.9 3_cp39 conda-forge reproc 14.2.3 h8ffe710_0 conda-forge reproc-cpp 14.2.3 h0e60522_0 conda-forge requests 2.28.1 pyhd8ed1ab_1 conda-forge ruamel.yaml 0.17.21 py39ha55989b_2 conda-forge ruamel.yaml.clib 0.2.7 py39ha55989b_1 conda-forge setuptools 65.6.3 pyhd8ed1ab_0 conda-forge tk 8.6.12 h8ffe710_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tqdm 4.64.1 pyhd8ed1ab_0 conda-forge tzdata 2022g h191b570_0 conda-forge ucrt 10.0.22621.0 h57928b3_0 conda-forge urllib3 1.26.13 pyhd8ed1ab_0 conda-forge vc 14.3 h3d8a991_9 conda-forge vs2015_runtime 14.32.31332 h1d6e394_9 conda-forge wheel 0.38.4 pyhd8ed1ab_0 conda-forge win_inet_pton 1.1.0 pyhd8ed1ab_6 conda-forge xz 5.2.6 h8d14728_0 conda-forge yaml-cpp 0.7.0 h63175ca_2 conda-forge zstandard 0.19.0 py39h95af829_1 conda-forge zstd 1.5.2 h7755175_4 conda-forge
Additional Context
No response
