备份和恢复 Conda 环境,以便在不同机器或系统之间迁移

时间:2025-05-06 08:57:14
自定义修改中的部分内容(可选)
首先解释一下,中的各个部分
举例:
name: fastinst
channels:
  - pytorch
  - conda-forge
  - defaults
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_gnu
  - blas=1.0=mkl
  - bzip2=1.0.8=hd590300_5
  - ca-certificates=2024.2.2=hbcca054_0
  - cudatoolkit=11.3.1=hb98b00a_13
  - ffmpeg=4.3=hf484d3e_0
  - freetype=2.10.4=h0708190_1
  - giflib=5.2.1=h0b41bf4_3
  - gmp=6.3.0=h59595ed_0
  - gnutls=3.6.13=h85f3911_1
  - icu=73.2=h59595ed_0
  - intel-openmp=2023.1.0=hdb19cb5_46306
  - jpeg=9b=h024ee3a_2
  - lame=3.100=h166bdaf_1003
  - lcms2=2.12=h3be6417_0
  - ld_impl_linux-64=2.38=h1181459_1
  - libblas=3.9.0=1_h86c2bf4_netlib
  - libcblas=3.9.0=5_h92ddd45_netlib
  - libffi=3.4.4=h6a678d5_0
  - libgcc-ng=13.2.0=h807b86a_5
  - libgfortran-ng=13.2.0=h69a702a_5
  - libgfortran5=13.2.0=ha4646dd_5
  - libgomp=13.2.0=h807b86a_5
  - libhwloc=2.9.1=hd6dc26d_0
  - libiconv=1.17=hd590300_2
  - liblapack=3.9.0=5_h92ddd45_netlib
  - libpng=1.6.37=h21135ba_2
  - libstdcxx-ng=13.2.0=h7e041cc_5
  - libtiff=4.2.0=h85742a9_0
  - libuv=1.47.0=hd590300_0
  - libwebp=1.2.0=h89dd481_0
  - libwebp-base=1.2.0=h7f98852_2
  - libxml2=2.10.4=hf1b16e4_1
  - lz4-c=1.9.3=h9c3ff4c_1
  - mkl=2023.1.0=h213fc3f_46344
  - ncurses=6.4=h6a678d5_0
  - nettle=3.6=he412f7d_0
  - ninja=1.11.1=h924138e_0
  - openh264=2.1.1=h780b84a_0
  - openssl=3.2.1=hd590300_0
  - pillow=9.3.0=py38hace64e9_1
  - pip=23.3.1=py38h06a4308_0
  - python=3.8.18=h955ad1f_0
  - python_abi=3.8=2_cp38
  - pytorch=1.10.0=py3.8_cuda11.3_cudnn8.2.0_0
  - pytorch-mutex=1.0=cuda
  - readline=8.2=h5eee18b_0
  - sqlite=3.41.2=h5eee18b_0
  - tbb=2021.9.0=hf52228f_0
  - tk=8.6.12=h1ccaba5_0
  - torchaudio=0.10.0=py38_cu113
  - torchvision=0.11.0=py38_cu113
  - typing_extensions=4.10.0=pyha770c72_0
  - wheel=0.41.2=py38h06a4308_0
  - xz=5.4.6=h5eee18b_0
  - zlib=1.2.13=h5eee18b_0
  - zstd=1.4.9=ha95c52a_0
  - pip:
      - absl-py==2.1.0
      - antlr4-python3-runtime==4.9.3
      - appdirs==1.4.4
      - black==21.4b2
      - cachetools==5.3.3
      - certifi==2024.2.2
      - charset-normalizer==3.3.2
      - cityscapesscripts==2.2.2
      - click==8.1.7
      - cloudpickle==3.0.0
      - coloredlogs==15.0.1
      - contourpy==1.1.1
      - cycler==0.12.1
      - cython==3.0.8
      - filelock==3.13.1
      - fonttools==4.49.0
      - fsspec==2024.2.0
      - future==1.0.0
      - fvcore==0.1.5.post20221221
      - google-auth==2.28.1
      - google-auth-oauthlib==1.0.0
      - grpcio==1.62.0
      - h5py==3.10.0
      - huggingface-hub==0.21.3
      - humanfriendly==10.0
      - hydra-core==1.3.2
      - idna==3.6
      - imageio==2.34.0
      - importlib-metadata==7.0.1
      - importlib-resources==6.1.2
      - iopath==0.1.9
      - kiwisolver==1.4.5
      - lazy-loader==0.3
      - markdown==3.5.2
      - markupsafe==2.1.5
      - matplotlib==3.7.5
      - mypy-extensions==1.0.0
      - networkx==3.1
      - numpy==1.24.0
      - oauthlib==3.2.2
      - omegaconf==2.3.0
      - opencv-python==4.9.0.80
      - opencv-python-headless==4.9.0.80
      - packaging==23.2
      - panopticapi==0.1
      - pathspec==0.12.1
      - platformdirs==4.2.0
      - portalocker==2.8.2
      - protobuf==4.25.3
      - pyasn1==0.5.1
      - pyasn1-modules==0.3.0
      - pycocotools==2.0.7
      - pydot==2.0.0
      - pyparsing==3.1.1
      - pyquaternion==0.9.9
      - python-dateutil==2.9.0.post0
      - pywavelets==1.4.1
      - pyyaml==6.0.1
      - regex==2023.12.25
      - requests==2.31.0
      - requests-oauthlib==1.3.1
      - rsa==4.9
      - safetensors==0.4.2
      - scikit-image==0.21.0
      - scipy==1.10.1
      - setuptools==59.5.0
      - shapely==2.0.3
      - six==1.16.0
      - submitit==1.5.1
      - tabulate==0.9.0
      - tensorboard==2.14.0
      - tensorboard-data-server==0.7.2
      - termcolor==2.4.0
      - tifffile==2023.7.10
      - timm==0.9.16
      - toml==0.10.2
      - tomli==2.0.1
      - tqdm==4.66.2
      - typing==3.7.4.3
      - urllib3==2.2.1
      - werkzeug==3.0.1
      - yacs==0.1.8
      - zipp==3.17.0
prefix: /home/my_conda_envs/fastinst