Install only available packages using “conda install –yes –file requirements.txt” without error

I ended up just iterating over the lines of the file

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

Edit: If you would like to install a package using pip if it is not available through conda, give this a go:

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

Edit: If you are using Windows (credit goes to @Clay):

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)