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

[Bug] msys2 channel packages not included w/ defaults channel #22

Closed
alanhdu opened this issue Apr 24, 2020 · 4 comments · Fixed by #23
Closed

[Bug] msys2 channel packages not included w/ defaults channel #22

alanhdu opened this issue Apr 24, 2020 · 4 comments · Fixed by #23

Comments

@alanhdu
Copy link
Contributor

alanhdu commented Apr 24, 2020

Right now, if I use the following environment YAML:

channels:
  - conda-forge
  - defaults
dependencies:
  - make==4.3

Then calling conda-lock -p win-64 environment.yml on a Linux box fails with:

The following packages are not available from current channels:

  - m2w64-gcc-libs

Current channels:

  - 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

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

I believe this is because defaults only includes the msys2 package on Windows, so running the solver on Linux removes this channel and causes this failure.

@alanhdu
Copy link
Contributor Author

alanhdu commented Apr 24, 2020

One cheap (if hacky) way to do this would be to inject the msys2 channel when calling conda at. I'd be happy to send the short PR if that's an acceptable solution.

https://github.com/mariusvniekerk/conda-lock/blob/182d64d9c2a802a3761c6f32763b6d4bf12770ef/conda_lock/conda_lock.py#L114-L115

@alanhdu
Copy link
Contributor Author

alanhdu commented Apr 24, 2020

(as a side-note, thanks so much for building this. This is something I've wanted for literally years now, and I'm so happy that it exists).

@mariusvniekerk
Copy link
Collaborator

Yeah that would be greatly appreciated

@ocefpaf
Copy link
Contributor

ocefpaf commented Apr 27, 2020

One cheap (if hacky) way to do this would be to inject the msys2 channel when calling conda at. I'd be happy to send the short PR if that's an acceptable solution.

Agreed. It makes sense to inject all the parts that mean main (aka defaults) on Window when calling it from a Linux box. Ideally we should upstream that and/or look into conda's docs to see if that doesn't exist already, but -p win-64 should just work.

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