Closed Krande closed 10 months ago
Can you post your conda config --show-sources
?
Sure,
(base) C:\Users\XXX>conda config --show-sources
==> C:\Code\miniforge3\.condarc <==
channels:
- conda-forge
==> C:\Users\XXX\.condarc <==
channels:
- conda-forge
@jaimergp FYI: I tried on a 3rd windows 10 computer with mambaforge 23.1.0-4 already installed and for some reason the envs_dir
order was as expected (ie. prioritizing <Miniforge3-installation-path>\envs
)
envs directories :
C:\Code\miniforge3\envs
%USERPROFILE%\.conda\envs
%USERPROFILE%\AppData\Local\conda\conda\envs
Out of interest I wanted to see what happened if I uninstalled mambaforge 23.1.0-4 and installed Miniforge 23.3.1-1. And when checking conda info
after installing miniforge, the envs_dir
order is prioritizing %USERPROFILE%
again.
envs directories :
%USERPROFILE%\.conda\envs
C:\Code\miniforge3\envs
%USERPROFILE%\AppData\Local\conda\conda\envs
How and where is the order of envs_dir
set? I can try to look into this as long as I get a little nudge in the right direction?
Update:
I tried uninstalling Miniforge 23.3.1-1
and re-installing Mambaforge 23.1.0-4
, but for some reason the order has not reverted back and is still prioritizing %USERPROFILE%
:(
Update 2:
I tried running the miniforge prompt with admin privileges, and when I do the order is prioritizing <Miniforge3-installation-path>\envs
. When I go back to "standard" privileges its back to %USERPROFILE%
.
Update 3:
I think I've tracked it to a permission issue. It seems the installation directory is slapped with a "read-only" permission for Mini/Mambaforge > 22.9.X-X. So this (https://github.com/conda/conda/blob/main/conda/base/context.py#L650) fails.
Update 4:
It seems that Mini/Mambaforge 22.9.0-1
also slaps a "read-only" permission on the top level installation directory, and despite that still manages to get OS write permissions to append to the C:\Code\miniforge3\conda-meta\history
.
Update 5 (hopefully solved):
Okay, it seems when I use the "Just me" option during the installation I DO get a choice of where I wish to install it. And when I use "Just me" I get the appropriate write permissions on C:\Code\miniforge3\conda-meta\history
and all is well. I wonder if the option of choosing where I want to install for the "just me" option was not there in some of the older mambaforge installers? Or maybe its my poor memory.
Nonetheless, I believe this issue can be closed. I will try to install using the "just me" option on a few more windows PC's tomorrow to be certain that this isnt just a coincidence.
Nonetheless, I believe this issue can be closed. I will try to install using the "just me" option on a few more windows PC's tomorrow to be certain that this isnt just a coincidence.
I was able to successfully install with the expected envs_dir
location using the "Just Me" on another windows 10 computer today, so you can close this issue if you want.
Thanks for the detailed investigation @Krande! When you install with "All Users", the installer ends up requesting admin permissions. But then if you run conda
in a "Just me" context (e.g. regular cmd), then it won't be able to write to that base location. In a superuser console it would have, though. Glad you could find a solution!
@jaimergp Thanks! That makes a lot of sense.
Solution to issue cannot be found in the documentation.
Issue
Hey,
On my Windows 10 machine the default location of the "envs" directory seems to have changed from
<Miniforge3-installation-path>\envs
to%USERPROFILE%/.condarc/envs
somewhere between versions 22.9.0-1 to 22.11.1-4.Due to security restrictions in the windows environment i'm currently on I am not allowed to install anything in the %USERPROFILE% directory. Basically anything installed there will not function properly, So when running the miniforge installer I install using "All Users" and choose a specific directory. I also allow creating start menu shortcuts and register Miniforge3 as the system python 3.10.
I was expecting that since I have explicitly chosen a "non-default" installation path, my created environments would be installed within the same installation directory. Or is that by design not the intention?
Here's what I have checked so far:
Tested across multiple versions/variants.
%USERPROFILE%
%USERPROFILE%
%USERPROFILE%
%USERPROFILE%
<Miniforge3-installation-path>/envs
I use the miniforge prompt when I do
mamba create -n testenv numpy
to create a test environment.envs_dir
to see if I can force the environments destination. But unfortunately, this changed nothing.Any help on this issue would much appreciated! Let me know if you need any more information to help on this,
Best Regards Kristoffer
Installed packages
Environment info