gpt4 book ai didi

conda.yaml 文件 : what does channel means and why there needs pip if dependencies already exists?

转载 作者:行者123 更新时间:2023-12-03 22:09:11 30 4
gpt4 key购买 nike

我正在研究 MLFlow,它使用 conda 来帮助设置环境和依赖项。在下面的 conda.yaml 文件/1/中,我有三个问题:

  • channel 是什么意思?为什么需要 python ?什么是默认 channel ?
  • 依赖部分有pip,pip是包管理工具。如果有dependencies 关键字,为什么又需要pip? pip 是否安装依赖项的依赖项。
  • 名称:flower_classifier,是否表示环境名称是花分类器?

  • /1/
    name: flower_classifier
    channels:
    - defaults
    - anaconda
    dependencies:
    - python==3.6
    - numpy==1.14.2
    - keras==2.2.4
    - pandas
    - pip:
    - tensorflow-gpu==1.10.0
    - mlflow
    - click==6.7
    - scikit-learn
    - pillow

    最佳答案

    1 channel

    这是指环境管理工具 Conda 将在何处查找已声明的依赖项。目前,defaults channel 会搜索 https://repo.anaconda.com/pkgs/ 目录下的所有 URL。 anaconda channel 是其中的一个子集,仅包含 pkgs/mainpkgs/freepkgs/pro 。没有必要同时包含这两个 channel ,因为 defaults 涵盖了它们。见 the Anaconda documentation on repositories

    2 为什么是点子?

    并非所有 Python 包都可用作 Conda 包。有些可能只能通过 PyPI 获得,或者可能首先在那里发布。通过在依赖项中包含 pip,将包含特定于 Python 的包管理器。在层次结构中列出 pip 下方的包,表明应该使用 pip 来安装这些包。

    3 环境名称

    是的,环境名称默认为 flower_classifier。但是,如果您碰巧不喜欢花,则可以使用 --name | -n 标志来覆盖它。

    conda env create -f conda.yaml -n my_env

    关于conda.yaml 文件 : what does channel means and why there needs pip if dependencies already exists?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55568079/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com