Gray Wolf Corporation

conda install with requirements.txt

If you are working in the anaconda environment you may run into the situation where an install is referencing pip with a requirement.txt file:

pip install -r requirements.txt

conda strongly recommends that you do all installs through conda install, but install dependencies can sometimes throw an error if you try to install like so:

conda install --yes --file requirements.txt

The workaround is to pipe the requirements to conda:

Windows

FOR /F "delims=~" %f in (requirements.txt) DO conda install --yes "%f" || pip install "%f"

Bash

while read requirement; do conda install --yes $requirement; done < requirements.txt

See original post on stackoverflow

An unhandled error has occurred. Reload 🗙