How can I specify conda (in the environment.yml
) to install opencv-contrib-python
with pip while specifying CMAKE_ARGS
.
Basically, how can I specify conda to run this command in the environment.yml
file
CMAKE_ARGS="-DOPENCV_ENABLE_NONFREE=ON" pip install --no-binary=opencv-contrib-python opencv-contrib-python
As it stands if I export the environment via conda env export > environment.yml
, it just specifies the version of opencv like so
name: test
channels:
- conda-forge
- pkgs/main
- defaults
dependencies:
- Bunch of conda dependencies
- pip:
- opencv-contrib-python==4.5.1.48
prefix: /home/an/miniconda3/envs/test