簡體   English   中英

無法在conda meta.yaml文件中指定pip依賴性

[英]can't specify pip dependency in conda meta.yaml file

我有以下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
...

當我嘗試運行它時,出現以下錯誤:

Error:  Packages/dependencies missing in current linux-64 channels: 
  - dsutils 1.0 py34_0 -> google-api-python-client
  - google-api-python-client

但是,當我擺脫了google-api-python-client依賴關系時,該程序包將成功構建。 請注意,無法通過conda install命令行安裝google-api-python-client,但可以使用pip進行安裝。

我的問題是:如何在meta.yaml conda軟件包文件中指定pip依賴關系?

如果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

然后再次運行conda build

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM