克隆 conda "root",如果这是您的基本初始安装的术语

Cloning conda "root", if that is the term for your basic initial install

似乎还有其他类似的问题,但none似乎就是这样。

我已经在一台机器上创建了一个 conda 安装。我想在第二台机器上创建完全相同的安装。我可以导出环境,然后使用导出的信息创建环境。但在所有示例中,我都创建了一个 environment,它是根的克隆。不是新根,而是根的克隆。

那么如何创建 conda 安装的真正克隆?这个想法是

  1. 导出机器1上root的环境 conda [something...] > configuration.yml

  2. 在机器 2

  3. 上使用 Miniconda....sh 安装 miniconda
  4. 重新创建原始环境 conda [install all the stuff including enironments] configuration.yml

我似乎找不到执行此操作的任何明确说明。 建议:

conda env export > environment.yml              
conda env update -n root -f environment.yml   

然而第一​​个命令绘制错误:

balter@server:/home/.../Applications$ conda env export > environment.yml


CondaEnvException: Conda Env Exception: Unable to determine environment

Please re-run this command with one of the following options:

* Provide an environment name via --name or -n
* Re-run this command inside an activated conda environment.


balter@server:/home/.../Applications$ conda -h
usage: conda [-h] [-V] command ...

conda is a tool for managing and deploying applications, environments and packages.

Options:

...
...

One of the posts我在网上看到有两点不太明白:

1) pip安装是否也结转,以及 2)

的区别
conda env create

conda create

Conda 环境作为此类问题的 存在。但是,可以按照您的要求去做。

第一步:确认你在第一台机器上是root环境,然后导出已安装包列表:

$ source activate root
$ conda list -e > root.yml

第 2 步:在另一台机器上,下载并安装 Miniconda,然后从 root.yml:

安装软件包
$ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ bash Miniconda3-latest-Linux-x86_64.sh
$ conda install --file root.yml