conda 通过yaml复制包

一、conda内虚拟环境中的包导出:

conda env export > environment.yaml

二、复制包

1.创建新的虚拟环境并将包导入:

conda env create -f environment.yaml

2.在已有的虚拟环境中导入这些包:

conda env update -n my_env --file environment.yaml

结果

导入成功:

Collecting package metadata (repodata.json): done
Solving environment: done

Please update conda by running

    $ conda update -n base -c defaults conda


Downloading and Extracting Packages
_libgcc_mutex-0.1    | 3 KB      | ############################################################### | 100% 
xorg-libxrender-0.9. | 31 KB     | ############################################################### | 100% 
setuptools-41.6.0    | 645 KB    | ############################################################### | 100% 
libblas-3.8.0        | 11 KB     | ############################################################### | 100% 
libiconv-1.16        | 1.4 MB    | ############################################################### | 100% 
xz-5.2.5             | 389 KB    | ############################################################### | 100% 
xorg-libsm-1.2.2     | 24 KB     | ############################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Ran pip subprocess with arguments:
['/home/anaconda3/envs/my-rdkit-env/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/xxx/condaenv.suycrukf.requirements.txt']
Pip subprocess output:
Collecting argparse==1.4.0
  Using cached https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Collecting chardet==3.0.4
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: setuptools in /home/xxx/anaconda3/envs/my-rdkit-env/lib/python2.7/site-packages (from conda-pack==0.6.0->-r /home/xxx/condaenv.suycrukf.requirements.txt (line 5)) (41.6.0.post20191030)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /home/xxx/anaconda3/envs/my-rdkit-env/lib/python2.7/site-packages (from requests==2.22.0->-r /home/xxx/condaenv.suycrukf.requirements.txt (line 26)) (2019.9.11)
Installing collected packages: argparse, chardet, click, click-plugins, conda-pack, configparser, decorator, pytz, django, funcsigs, functools32, idna, libretranslatepy, lxml, six, pymongo, mongoengine, mysqlclient, networkx, numpy, pubchempy, sqlalchemy, tqdm, pyparsing, urllib3, requests, requests-file, pybel, pymysql, supervisor, translate, uwsgi, uwsgitop, xlwt
  Found existing installation: pytz 2021.3
    Uninstalling pytz-2021.3:
      Successfully uninstalled pytz-2021.3
  Found existing installation: six 1.16.0
    Uninstalling six-1.16.0:
      Successfully uninstalled six-1.16.0
  Found existing installation: numpy 1.16.5
    Uninstalling numpy-1.16.5:
      Successfully uninstalled numpy-1.16.5
Successfully installed argparse-1.4.0 chardet-3.0.4 click-7.0 click-plugins-1.1.1 conda-pack-0.6.0 configparser-4.0.2 decorator-4.4.1 django-1.11 funcsigs-1.0.2 functools32-3.2.3.post2 idna-2.8 libretranslatepy-2.1.1 lxml-4.9.1 mongoengine-0.19.1 mysqlclient-1.4.5 networkx-2.2 numpy-1.16.6 pubchempy-1.0.4 pybel-0.12.2 pymongo-3.12.3 pymysql-0.9.3 pyparsing-2.4.4 pytz-2022.1 requests-2.22.0 requests-file-1.4.3 six-1.13.0 sqlalchemy-1.3.10 supervisor-4.1.0 tqdm-4.37.0 translate-3.6.1 urllib3-1.25.6 uwsgi-2.0.20 uwsgitop-0.11 xlwt-1.3.0

#
# To activate this environment, use
#
#     $ conda activate my-rdkit-env
#
# To deactivate an active environment, use
#
#     $ conda deactivate


  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值