无法在 conda meta.yaml 文件中指定 pip 依赖项

swe*_*eet 5 python dependencies package anaconda conda

我有以下 meta.yaml 文件来构建 conda 包:

package:
  name: dsutils
  version: 1.0

source:
  git_rev: cat_files_bq_utils
  git_url: https://**********.git

requirements:
  build:
    - python
    - setuptools

  run:
    - python
    - pandas
    - scipy
    - numpy
    - scikit-learn ==0.17.0
    - google-api-python-client
...
Run Code Online (Sandbox Code Playgroud)

当我尝试运行它时,出现以下错误:

Error:  Packages/dependencies missing in current linux-64 channels: 
  - dsutils 1.0 py34_0 -> google-api-python-client
  - google-api-python-client
Run Code Online (Sandbox Code Playgroud)

但是当我摆脱 google-api-python-client 依赖项时,包就成功构建了。请注意,google-api-python-client 无法通过conda install命令行安装,但可以使用 pip 安装。

我的问题是:如何在 meta.yaml conda 包文件中指定 pip 依赖项?

kal*_*anz 4

如果conda search没有显示任何结果,最简单的方法是访问 anaconda.org 并查看其他渠道是否已经为您构建了该包。

https://anaconda.org/search?q=google-api-python-client&sort=ndownloads&sort_order=1&reverse=true

看起来该pandas频道有您需要的内容,所以

conda config --append channels pandas
Run Code Online (Sandbox Code Playgroud)

然后conda build再次运行。