anaconda 环境迁移

1、导出安装包列表:

 conda env export >c:\\env.yaml

env.yaml内容入如下,需要修改最后一行

name: torch
channels:
  - https://mirrors.ustc.edu.cn/anaconda/pkgs/free
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
  - defaults
dependencies:
  - python=3.6.2=0
  - setuptools=36.4.0=py36_1
  - vc=14=0
  - vs2015_runtime=14.0.25420=0
  - wheel=0.29.0=py36_0
  - wincertstore=0.2=py36_0
  - pip:
    - beautifulsoup4==4.9.1
    - certifi==2020.6.20
    - chardet==3.0.4
    - click==7.1.2
    - cython==0.29.14
    - gensim==3.8.3
    - idna==2.10
    - joblib==1.0.0
    - nltk==3.5
    - numpy==1.19.4
    - pip==21.0.1
    - pymysql==1.0.2
    - regex==2020.11.13
    - requests==2.24.0
    - scikit-learn==0.24.0
    - scipy==1.5.4
    - six==1.15.0
    - sklearn==0.0
    - smart-open==4.0.1
    - soupsieve==2.0.1
    - threadpoolctl==2.1.0
    - tqdm==4.56.0
    - urllib3==1.25.10
prefix: /path/anaconda3/envs/torch  ###修改此处
2、导入到新的环境

conda env create -f env.yaml



标签: anaconda、mirrors、env、py36、pkgs、面试
  • 回复
隐藏