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

Pip-packages do not get exported #58

Open
1 of 2 tasks
JohannesWiesner opened this issue May 30, 2023 · 5 comments
Open
1 of 2 tasks

Pip-packages do not get exported #58

JohannesWiesner opened this issue May 30, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@JohannesWiesner
Copy link
Owner

JohannesWiesner commented May 30, 2023

Both the exported .yml file and the spec-file (.txt) should include pip-packages:

@JohannesWiesner
Copy link
Owner Author

Does this help?

https://pypi.org/project/conda-env-export/

@JohannesWiesner
Copy link
Owner Author

@JohannesWiesner
Copy link
Owner Author

Opened an issue here

JohannesWiesner added a commit that referenced this issue May 31, 2023
@JohannesWiesner
Copy link
Owner Author

For the Windows job, we have to rely on conda:

If you rely on pip dependencies being added to the export, then you need to call conda (which can be done on windows runners with /c/Miniconda/_conda.exe env export ...)

@JohannesWiesner
Copy link
Owner Author

I think generally, with micromamba, pip-packages get ignored (also for the .yml file). We generally should use conda commands. Something like (?):

if [ "$RUNNER_OS" == "Windows" ]; then
  /c/Miniconda/_conda.exe env export -p "${MAMBA_ROOT_PREFIX}/envs/${{ matrix.os }}" | grep -v "^prefix: " > ./environments/csp_${{ matrix.os }}_solved.yml
  /c/Miniconda/_conda.exe env export -p "${MAMBA_ROOT_PREFIX}/envs/${{ matrix.os }}" --explicit > ./environments/csp_${{ matrix.os }}_solved.txt
elif [ "$RUNNER_OS" == "Linux" ]; then
  conda env export -p "${MAMBA_ROOT_PREFIX}/envs/${{ matrix.os }}" | grep -v "^prefix: " > ./environments/csp_${{ matrix.os }}_solved.yml
  conda env export -p "${MAMBA_ROOT_PREFIX}/envs/${{ matrix.os }}" --explicit > ./environments/csp_${{ matrix.os }}_solved.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant