Search code examples
anacondacondadevelopment-environment

Install packages into existing conda environment specified in environment.yml


I have anaconda environment called 'juldou_learning'.

I downloaded from Git a project with environment.yml inside.

I don't want to create new environment with environment.yml like:

conda env create -f environment.yml

but, only install packages to juldou_learning which are present in environment.yml file.

following does not work:

(juldou_learning) MBPuzivlaJulius:juldou_learning juldou$ conda install --file environment.yml 

CondaValueError: could not parse 'name: juldou_learning' in: environment.yml

Solution

  • You can use the env command

    conda env update --file environment.yml
    

    You may need to activate the environment into which the packages are going to be installed first.