conda env导出中的构建信息包含什么?

时间:2020-04-14 17:00:18

标签: anaconda conda

使用conda env export时,可以使用--no-build删除构建信息:

...
dependencies:
  - _libgcc_mutex=0.1=main
  - attrs=19.3.0=py_0
  - backcall=0.1.0=py37_0
  - beautifulsoup4=4.8.2=py37_0
  - biopython=1.76=py37h7b6447c_0
  - blas=1.0=mkl
  - bleach=3.1.0=py37_0
...

--no-build

dependencies:
  - _libgcc_mutex=0.1
  - attrs=19.3.0
  - backcall=0.1.0
  - beautifulsoup4=4.8.2
  - biopython=1.76
  - blas=1.0
  - bleach=3.1.0
  - bzip2=1.0.8
  - ca-certificates=2020.1.1

您能否详细解释此构建信息到底是什么?编译器及其版本?里面还有什么?

1 个答案:

答案 0 :(得分:1)

内部信息是配方中变量键的哈希值。引用文档:

外卖消息是,当二进制兼容性很重要时,将显示哈希,但在无关紧要的时候,则不显示。

从conda-build 3.1.0开始,此哈希方案已得到简化。如果所有这些对于任何依赖项都为真,则会添加一个哈希:

  • 包是构建,托管或运行deps中的显式依赖项。

  • 软件包在conda_build_config.yaml中具有匹配的条目,这是特定版本而非下限的引脚。

  • ignore_version不会忽略该软件包。

OR

  • 程序包使用{{ compiler() }} Jinja2函数。

文档在这里:https://docs.conda.io/projects/conda-build/en/latest/resources/variants.html#differentiating-packages-built-with-different-variants还有一篇博客文章(我现在找不到),其中包含更多信息。