Install packages into existing conda environment specified in environment.yml

后端 未结 2 1290
深忆病人
深忆病人 2021-01-05 01:00

I have anaconda environment called \'juldou_learning\'.

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

I don\'t want

相关标签:
2条回答
  • 2021-01-05 01:43

    Like @darthbith said, use conda-env update, but don't forget to name the environment you want to install the packages into. If the environment.yml file contains an environment name, your packages will get installed there, regardless of which environment is currently activated. Here's how to name the target environment name:

    conda env update --name environment_name --file environment.yml
    

    Of course there are short argument names for --name and --file. To install the environment.yml packages in my base conda environment (the one that's activated if you haven't activated any others) I had to:

    conda env update -n base -f environment.yml
    
    0 讨论(0)
  • 2021-01-05 02:01

    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.

    0 讨论(0)
提交回复
热议问题