Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not solve environment on Linux due to the removal of the defaults channel from environment.yml #2722

Closed
ssun30 opened this issue Oct 10, 2024 · 5 comments · Fixed by #2723

Comments

@ssun30
Copy link
Contributor

ssun30 commented Oct 10, 2024

Bug Description

Specific to Linux:

Users may encounter a problem when installing RMG following our updated instructions introduced in PR #2719 . The following error message occurs when the user attempts to create the conda environment:

Solving environment: ...working... failed
  Warning: 
  LibMambaUnsatisfiableError: Encountered problems while solving:
    - package cantera-2.6.0-py310h6cd0baa_0 requires mkl, but none of the providers can be installed
  
  Could not solve for environment specs
  The following packages are incompatible
  ├─ cantera 2.6*  is installable and it requires
  │  └─ mkl, which can be installed;
  └─ nomkl is not installable because it requires
     └─ mkl <0.a0 , which conflicts with any installable versions previously reported.

How To Reproduce

By following instructions "Installation by Source Using Anaconda Environment for Unix-based Systems: Linux and Mac OSX" steps 1 through 7 (step 6 skipped).

Users who encounter this problem either have a blank .condarc file or not have the defaults channel in .condarc.

Installation Information

Describe your installation method and system information.

  • Ubuntu 22.04 LTS, CentOS Linux 7 (on Discovery)
  • x86_64 hardware architecture
  • Installation from source with Miniforge3
  • RMG version information:
    • RMG-Py: 3.2.0-357-g74ef5e699
    • RMG-database: 3.2.0-111-gcc0ecdb86

Additional Context

We recently removed the defaults channel from environment.yml due to changes to Anaconda's Terms of Service (PR #2712). Now we aren't installing any package from the official channel. But this introduced the error shown above.

The problem goes away with either one of these workarounds:

  • Adding the defaults channel in user's .condarc file.
  • Removing the -nomkl mutex metapackage from environment.yml.

From my understanding, it seems that Cantera 2.6 on Linux uses mkl instead of openblas, so the -nomkl toggle may result in an incompatibility when solving the environment. But for reasons beyond my understanding, adding the defaults channel bypasses this problem.

This problem escaped our CI because the conda-incubator/setup-miniconda Github Action automatically creates a .condarc file in the runner's home directory that includes the defaults channel.

A user who starts from scratch may have a blank conda config file in their home directory, so in their case the mamba solver will only look for packages in the three channels we included in environment.yml.

I have created a branch with a modified CI workflow file where a custom conda config file without the defaults channel is used instead of the one automatically created by the Github Action. The CI will fail with the expected error message.

@JacksonBurns
Copy link
Contributor

Can we just do what this SO post suggests and add the desired OpenBLAS variant to the environment.yml in place of nomkl?

@rwest
Copy link
Member

rwest commented Oct 10, 2024

It's weird to me that when we removed defaults from the channel list it looked like it wasn't installing anything from the defaults channel (see #2712 (comment) for example) and yet Su's demo in https://github.com/ReactionMechanismGenerator/RMG-Py/tree/miniforge_action_test is pretty conclusive.

I wonder how adding the defaults channel fixes things.

@JacksonBurns
Copy link
Contributor

I wonder how adding the defaults channel fixes things.

The nomkl mutex metapackage isn't hosted on any non-default channels, so adding default back fixes it.

@ssun30
Copy link
Contributor Author

ssun30 commented Oct 11, 2024

I wonder how adding the defaults channel fixes things.

The nomkl mutex metapackage isn't hosted on any non-default channels, so adding default back fixes it.

https://anaconda.org/conda-forge/nomkl

I'm not sure whether that's the cause since I just saw this.

But the solution you posted indeed works. Tested locally and passed the CI.

@JacksonBurns
Copy link
Contributor

Hmm.. that's confusing. Alas - if it works, it works.

@JacksonBurns JacksonBurns linked a pull request Oct 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants