boa icon indicating copy to clipboard operation
boa copied to clipboard

`.mambarc`/`.condarc` being ignored?

Open dhirschfeld opened this issue 3 years ago • 6 comments

I have a .mambarc which specifies only the conda-forge channel but when building with boa packages were being installed from pkgs/main.

I copied my /opt/micromamba/.mambarc to /opt/micromamba/.condarc but without any luck. What did work was copying /opt/micromamba/.mambarc to ~/.condarc (copying to ~/.mambarc also didn't seem to work).

So, I think there are two (probably related) issues here:

  1. boa seems to only support .condarc and not .mambarc
  2. boa seems to ignore a .condarc in $MAMBA_ROOT_PREFIX

dhirschfeld avatar Oct 04 '22 05:10 dhirschfeld

See also #265

mparry avatar Oct 07 '22 11:10 mparry

See also #265

In my case I found that the .condarc does work, but only if it is located at ~/.condarc and not in a system location (e.g. $MAMBA_ROOT_PREFIX).

dhirschfeld avatar Oct 07 '22 11:10 dhirschfeld

I believe that we were indeed relying upon a system config, rather than user, in the scenario that I was outlining in #265 - though it's been a while! Also seems to be true for at least the first reply there, from someone else experiencing it. I do think that this is probably the same issue.

Probably best if I close #265, rather than you closing this one, as I think your report is more accurate and succinct.

mparry avatar Nov 02 '22 09:11 mparry

I do think that this is probably the same issue.

Yeah - this is probably a dup of your issue but happy to keep discussion here if that's easiest.

dhirschfeld avatar Nov 02 '22 10:11 dhirschfeld

I think this issue also impacts the creation of new environments from an environment.yml that specifies boa as a dependency. In my base environment mamba info reports:

           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch

Exactly as I would expect. However, if I create a new environment (mamba create -f environment.yml) based on an environment.yml that contains

name: build_env
channels:
    - conda-forge
dependencies:
    - boa

then inside of that environment mamba info reports:

           channel URLs : 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

If I don't list boa as a dependency in environment.yml then the resulting environment only includes the conda-forge channels like I would expect. I can also manually install boa in to one of these environments and conda-forge remains the only active channel.

The only way I've been able to include boa as a dependency in environment.yml and keep conda-forge as the only channel in the new environment is to copy .condarc, which only lists the conda-forge channels, from my system mambaforge install to ~/ before creating the new environment.

jedfrechette avatar Dec 22 '22 22:12 jedfrechette

This one bit me again. Fortunately, I remembered this issue and copied my .mambarc to ~/.condarc and the build was able to progress until the test stage.

At the test stage it then fails with:

RuntimeError: Solver could not find solution.Mamba failed to solve:
 - eq-example 0.9.9 h0ef3cea_0
 - python 3.10.12 hd12c33a_0_cpython
<snip>

with channels:

The reported errors are:
- Encountered problems while solving:
-   - nothing provides requested eq-example 0.9.9 h0ef3cea_0

...so, it can't find the package that was just built. The empty with channels: also seems a bit suspect.

I have created duplicate .mambrc/.condarc file in both system and home folders with no luck resolving the issues in the test stage.

I suspect this problem may have always been there and I just wasn't testing before (I have historically tested externally to the build)

Edit: Removing the test lets the build complete successfully (with my patched boa)

dhirschfeld avatar Jun 24 '23 11:06 dhirschfeld