pip – Specifying –use-deprecated=legacy-resolver in conda YAML file

I’m creating an environment in an Azure DevOps pipeline from a .yml file. However, one of my modules has dependency issues, causing conda env create -n env-name --file conda.yml to get stuck. I know that I need to use --use-deprecated=legacy-resolver but since I’m creating the environment from a YAML file I don’t know how to specify it in my YAML file (rather than directly running pip install).

channels:
  - conda-forge
  - nodefaults

dependencies:
    - python=3.9.12
    - pip>=19.0
    - pip:
        - numpy==1.22.0
        - pandavro 
        - scikit-learn 
        - ipykernel
        - pyspark
        - mlflow
        - mltable

I’ve tried adding [--use-deprecated=legacy-resolver] after one of my modules (e.g. pandavro [--use-deprecated=legacy-resolver]) but it seems like Conda doesn’t recognize this syntax.

Read more here: Source link