How to create Conda environment using YML file?

Description of this Note
Author
Published

September 11, 2023

1 Define YML requirements

For instance the following file: environment.yml

name: cv1
channels:
  - conda-forge
  - defaults
dependencies:
  - python=3.7
  - pip=21.3.1
  - pip:
    - numpy==1.19.5
    - opencv-contrib-python==3.4.2.17
    - matplotlib==3.3.4
    - jupyter==1.0.0
    - scikit-learn==0.23.0
    - scipy==1.5.4

2 Create Conda ENV from terminal

conda env create -f path/to/environment.yml