Created
August 25, 2023 09:36
-
-
Save tbrittoborges/e6767fca318b4359daf0eb5407b9b17d to your computer and use it in GitHub Desktop.
Saving conda envs programatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash env | |
conda activate | |
mkdir -p envs/.export | |
PREFIX=$(dirname "$CONDA_PREFIX") | |
for d in "$PREFIX"/*; do | |
BNAME=$(basename "$d") | |
echo "$BNAME" | |
conda env export --prefix "$d" --json > envs/.export/"$BNAME".json | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment