I work with conda environments and need some pip packages as well, e.g. pre-compiled wheels from ~gohlke.
At the moment I have two files: environment.yml
for conda with:
# run: conda env create --file environment.yml
name: test-env
dependencies:
- python>=3.5
- anaconda
and requirements.txt
for pip which can be used after activating above conda environment:
# run: pip install -i requirements.txt
docx
gooey
http://www.lfd.uci.edu/~gohlke/pythonlibs/bofhrmxk/opencv_python-3.1.0-cp35-none-win_amd64.whl
Is there a possibility to combine them in one file (for conda)?
One can also use the
requirements.txt
directly in the YAML. For example,Basically, any command you can run with
pip
you can run in a YAML. See the Advanced Pip Example for a showcase of other capabilities.Just want to add that adding a wheel in the directory also works. I was getting this error when using the entire URL:
Ended up downloading the wheel and saving it into the same directory as the yml file.
Pip dependencies can be included in the
environment.yml
file like this (docs):It also works for
.whl
files in the same directory (see Dengar's answer) as well as with common pip packages.