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

conda export does not export pip as a dependency of conda and throws syntax error with Windows runner #2686

Open
JohannesWiesner opened this issue Jul 17, 2023 · 5 comments
Labels
type::bug Something isn't working

Comments

@JohannesWiesner
Copy link

I am using mamba-org/setup-micromamba@v1 to solve an environment using an input .yml file and then export the solved environment using:

conda env export -p "${MAMBA_ROOT_PREFIX}/envs/test" | grep -v "^prefix: " > test_solved.yml (see this link)

When I use the ubuntu-latest runner, everything works fine, but when I use the windows-latest image, two strange things happen:

1.) Normally, pip itself should appear as a dependency itself in the conda section before the pip packages get listed. This does not happen.
2.) When inspecting the exported .yml file there seems to be a syntax error. The first package under the pip: section looks like this:

  - pip:
      - ==9.2.6

I created a minimal repo to reproduce this error: https://github.com/JohannesWiesner/test_push_yml/tree/main

@jonashaag
Copy link
Collaborator

Can you try to reproduce this locally (without GHA) with a recent version of Micromamba and Conda?

@JohannesWiesner
Copy link
Author

I asked a colleague who has Windows installed to do it. Will come back to you with the results. In the meantime I also changed the input .yml file from this to this:

channels:
  - conda-forge
dependencies:
  - python
  - scikit-learn
  - pip
  - pip:
    - xmltodict

Here also something strange is happening. Pip lists itself as a dependency:

  - pip:
      - brotli==1.0.9
      - certifi==2023.5.7
      - charset-normalizer==3.2.0
      - idna==3.4
      - joblib==1.3.0
      - numpy==1.25.1
      - packaging==23.1
      - pip==23.2

@JohannesWiesner
Copy link
Author

@jonashaag : @Engrammae could reproduce the errors locally on his Windows machine. Might then be a mamba/micromamba issue?

@jonashaag
Copy link
Collaborator

Yes!

@jonashaag jonashaag transferred this issue from mamba-org/setup-micromamba Jul 18, 2023
@jonashaag jonashaag added the type::bug Something isn't working label Jul 18, 2023
@jonashaag
Copy link
Collaborator

jonashaag commented Jul 18, 2023

I transfered the issue to the Mamba repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants