Skip to content

Instantly share code, notes, and snippets.

@ShawonAshraf
Forked from luiscape/install_packages.sh
Created March 9, 2017 17:59
Show Gist options
  • Save ShawonAshraf/1ee95026b80838d3f51776a5bdfcd2d4 to your computer and use it in GitHub Desktop.
Save ShawonAshraf/1ee95026b80838d3f51776a5bdfcd2d4 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