Conda-Build:平台osx-64的不满足依赖性:{" torch [version ='> = 0.4']"}

时间:2018-06-15 21:49:38

标签: python python-3.x anaconda setuptools conda

我是构建conda软件包的新手。我已将该程序包上传到PyPI,因此我按照此文档了解了building conda from pip package。它在我尝试从pyinstrument构建pip时起作用,但是当我尝试构建我的包时出现以下错误。

conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform osx-64: {"torch[version='>=0.4']"}

我发现了一个类似的问题here,但添加频道并未解决我的问题,因为默认频道中存在pytorch

这是我的meta.yml文件:

{% set name = "scvi" %}
{% set version = "0.1.2" %}
{% set file_ext = "tar.gz" %}
{% set hash_type = "sha256" %}
{% set hash_value = "ca87155662d85605f86c5e86b7b9f64d881b882177b9642fff8f0ea215c6cb1a" %}

package:
  name: '{{ name|lower }}'
  version: '{{ version }}'

source:
  fn: '{{ name }}-{{ version }}.{{ file_ext }}'
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.{{ file_ext }}
  '{{ hash_type }}': '{{ hash_value }}'

build:
  number: 0
  script: python setup.py install --single-version-externally-managed --record=record.txt

requirements:
  run:
    - python 3.6
    - setuptools
    - numpy>=1.0
    - torch>=0.4
    - matplotlib>=2.0
    - scikit-learn>=0.18
    - scipy>=1.0
    - h5py>=2.8
    - pandas>=0.2
    - loompy>=2.0

test:
  imports:
    - scvi
    - scvi.dataset
    - scvi.metrics
    - scvi.models
  requires:
    - pytest

about:
  home: https://github.com/YosefLab/scVI
  license: MIT
  license_family: MIT
  license_file: 'LICENSE'
  summary: Single-cell Variational Inference
  description: Single-cell Variational Inference
  doc_url: https://scvi.readthedocs.io
  dev_url: https://github.com/YosefLab/scVI

关于我应该考虑哪个方向的任何可能的解决方案或建议都会非常有帮助。谢谢!

1 个答案:

答案 0 :(得分:4)

通过运行meta.yml,证明自动生成的conda skeleton pypi {package name}文件中存在错误。在meta.yml中,它应该是pytorch而不是torch