Created
April 21, 2018 22:33
-
-
Save lfir/a20d5df1beb6e391cf1a99b7f47a70ee to your computer and use it in GitHub Desktop.
update all conda venvs/prefixes
This file contains hidden or 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 | |
#tested with conda 4.5.0 | |
envs_dir=$(conda config --show | grep -A 1 envs_dirs | grep -oE '/.+$') | |
find "$envs_dir" -mindepth 1 -maxdepth 1 -type d -exec conda update --all --prefix {} \; | |
#alternative method | |
#cd "$envs_dir" || exit | |
#for env in *; do | |
# [ -e "$env" ] || continue | |
# env_path="$envs_dir"/"$env" | |
# conda update --all --prefix "$env_path" | |
#done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment