Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dermatologist/14e63aa667e49f8563b30ce020fc54cf to your computer and use it in GitHub Desktop.
Save dermatologist/14e63aa667e49f8563b30ce020fc54cf to your computer and use it in GitHub Desktop.
# Having a requirements.txt file has follows
torch==1.5.0
numpy==1.18.1
# Add channels. Last added is with the highest priorety
conda config --add channels pytorch
conda config --add channels conda-forge
conda config --add channels anaconda
# Install pip for fallback
conda install --yes pip
# Install with conda. If package installation fails, install with pip.
while read requirement; do conda install --yes $requirement || pip install $requirement; done < requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment