【极简】conda同一个服务器上迁移环境 export / create

导出

直接看conda的document:https://docs.conda.io/projects/conda/en/latest/commands/env/export.html

conda env export
conda env export --file SOME_FILE

重建

conda documentation: https://docs.conda.io/projects/conda/en/latest/commands/env/create.html

conda env create
conda env create -n envname
conda env create folder/envname
conda env create -f /path/to/environment.yml
conda env create -f /path/to/requirements.txt -n envname
conda env create -f /path/to/requirements.txt -p /home/user/envname

例子

先conda avtivate到自己想要导出的env,在当前目录直接conda env export --file lavis.conda.env.yml,file参数你自己随便起,当前目录下就会出现一个文件。然后conda env create -f lavis.conda.env.yml -n new_env,这样就把之前的环境迁移到new_env了。想使用就conda activate new_env就行了。

注意格式,必须是yml txt yaml三者选一。

相关推荐

  1. 001-Windows下PyTorch开发环境配置(

    2024-01-31 05:56:05       18 阅读
  2. Conda 环境迁移

    2024-01-31 05:56:05       20 阅读
  3. conda虚拟环境迁移办法

    2024-01-31 05:56:05       32 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-31 05:56:05       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-31 05:56:05       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-31 05:56:05       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-31 05:56:05       20 阅读

热门阅读

  1. Linux系统MySQL重置root密码

    2024-01-31 05:56:05       28 阅读
  2. 代码随想录算法训练营第17天

    2024-01-31 05:56:05       35 阅读
  3. react的withRouter高阶组件:

    2024-01-31 05:56:05       34 阅读
  4. 力扣0111——二叉树的最小深度

    2024-01-31 05:56:05       42 阅读
  5. ClickHouse(24)ClickHouse集成mongodb表引擎详细解析

    2024-01-31 05:56:05       37 阅读
  6. React 基础学习01

    2024-01-31 05:56:05       45 阅读
  7. 比VS Code快得多

    2024-01-31 05:56:05       33 阅读