Skip to content

Instantly share code, notes, and snippets.

@nashid
Forked from luiscape/install_packages.sh
Last active June 24, 2021 06:56
Show Gist options
  • Save nashid/db40b669a07a05964f708f20859e8d0a to your computer and use it in GitHub Desktop.
Save nashid/db40b669a07a05964f708f20859e8d0a to your computer and use it in GitHub Desktop.
Install Python dependency packages from requirements.txt Using conda.
#
# Original solution via StackOverflow:
# http://stackoverflow.com/questions/35802939/install-only-available-packages-using-conda-install-yes-file-requirements-t
#
#
# Install via `conda` directly.
# This will fail to install all
# dependencies. If one fails,
# all dependencies will fail to install.
#
conda install --yes --file requirements.txt
#
# To go around issue above, one can
# iterate over all lines in the
# requirements.txt file.
#
while read requirement; do conda install --yes $requirement; done < requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment