How to transfer all conda environments to new computer

35 views Asked by At

Is it possible to transfer all of my individual conda environments to a file, where each environment lists the packages, and then I can rebuild all of the environments at once on the new machine?

There are many similar questions on here, but commands such as conda list --export > package-list.txt just list every package in all of the environments. I could build a file environment-by-environment using conda env export > environment.yml, but would prefer to avoid that.

Is there a way to create a file that would look something like the below, that would then recreate each environment?

name: ckcviz
channels:
  - defaults
  - conda-forge
dependencies:
  - abseil-cpp=20230802.0=h61975a4_2
  - altair=5.0.1=py311hecd8cb5_0
  - anyio=4.2.0=py311hecd8cb5_0
name: env2
channels:
  - defaults
  - conda-forge
dependencies:
  - abseil-cpp=20230802.0=h61975a4_2
  - blas=1.0=openblas
  - bleach=4.1.0=pyhd3eb1b0_0
0

There are 0 answers