zoukankan      html  css  js  c++  java
  • 【conda】conda环境的复制移植的两种方法

    https://blog.csdn.net/weixin_37251044/article/details/117105090
    1. 环境复制

        首先conda info --envs 查看当前有哪些环境。

        执行 conda create -n [name] --clone [path] 等待完即可

    备注:其中 name:是新环境得名称,path是第一步查询时,所需要复制得环境路径。如果需要重命名,可以使用这种方法,再把之前得删掉(记得先测试一下能不能使用)
    2. 环境移植(可移植其他系统)

        首先激活环境conda activate [name] name是环境名称
        生成yaml文件:conda env export > [name].yaml
        复制到新的系统下后:执行 conda env create -f [name].yaml,一般到这就完成了。
        有的时候还需要安装pip安装的包:

        1.导出pip安装的包:pip freeze > requirements.txt
        2.将requirements.txt 文件复制到新的系统中
        3.pip导入包:pip install -r requirements.txt
     

    _________________________________________________________________________________________________________________________________________________
    每一个不曾起舞的日子,都是对生命的辜负。
    But it is the same with man as with the tree. The more he seeks to rise into the height and light, the more vigorously do his roots struggle earthward, downward, into the dark, the deep - into evil.
    其实人跟树是一样的,越是向往高处的阳光,它的根就越要伸向黑暗的地底。----尼采
  • 相关阅读:
    推荐系统相关算法
    特征的生命周期
    数学知识索引
    蓄水池(Reservoir_sampling)抽样算法简记
    数赛刷题代码学习及课程学习链接
    逻辑回归(LR)总结复习
    我的面试问题记录
    开发中遇到的一些问题
    K-Means聚类和EM算法复习总结
    常见概率分布图表总结
  • 原文地址:https://www.cnblogs.com/leoking01/p/14893207.html
Copyright © 2011-2022 走看看