简体   繁体   中英

Add full anaconda package list to existing conda environment

I know how to add single packages and I know that the conda create command supports adding a new environment with all anaconda packages installed.

But how can I add all anaconda packages to an existing environment?

I was able to solve the problem as following:

  1. Create a helper env with anaconda: conda create -n env_name anaconda
  2. Activate that env conda activate env_name
  3. Export packages into specification file: conda list --explicit > spec-file.txt
  4. Activate the target environment: activate target_env_name
  5. Import that specification file: conda install --file spec-file.txt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM