Conda构建-在win-64平台上依赖项创建Conda包失败

3
从本地目录创建我的第一个conda包。按照CONDA网站上的说明操作。https://conda.io/docs/user-guide/tasks/build-packages/recipe.html 我遇到了以下错误。
conda_build.exception.DependencyNeedsBuildingError: 无法满足平台win-64的依赖项:set([u'pywinauto', u'statistics', u'openturns'])
我尝试了几个命令,但似乎pywinauto、statistics和openturns会导致依赖关系问题。
这是我的meta.yml文件。
package:
  name: apples
  version: "1.0.0"

source:
  path: ../src

target_platform:
  - win-64

requirements:
  build:
    - python
    - setuptools
    - statistics # [win64]
    - pywinauto # [win64]
    - openturns # [win64]
    - matplotlib
    - numpy
    - pandas
    - pip
    - pyodbc
    - pyqt
    - pywin32
    - qt
    - scipy
    - tqdm
    - xlwings

  run:
    - python
    - matplotlib
    - numpy
    - pandas
    - pip
    - pyodbc
    - pyqt
    - pywin32
    - qt
    - scipy
    - tqdm
    - xlwings
    - statistics # [win64]
    - pywinauto # [win64]
    - openturns # [win64]
1个回答

4

当我移除pywinauto时,构建失败并产生相同的错误,只是出现以下名称(openturns,statistics),我会认为因为它们在conda-forge频道上,所以它会正常地拉取它们而不会出错。但事实并非如此。对于pywinauto,当我尝试运行'conda skeleton pypi pywinauto'时,返回一个导入错误,没有找到包。我可能只需将以下内容添加到bld.bat脚本中: conda install -c conda-forge openturns -y conda install -c conda-forge statistics -y pip install pywinauto - dfresh22
1
在构建软件包或在构建步骤conda build -c conda-forge recipe_dir中指定频道之前,您需要使用 conda config --append channels conda-forgeconda-forge 添加到您的频道列表中。否则,conda 如何知道在哪里找到该软件包? - darthbith
  1. 在构建步骤中绝对不应进行安装。如果在构建步骤中进行安装,那么用户如何获取所需的依赖关系?我记得,conda-build 实际上禁止这种情况发生,但可能并不正确。我知道它会禁止通过 setuptools 自动安装软件包来完成安装过程。
- darthbith
我刚刚运行conda skeleton pypi pywinauto没有任何问题(尽管我是在Linux上运行...)。也许再试一次,如果不行,考虑发布一个新的问题 :-) 我在构建pywinauto时遇到了问题,因为其中一个依赖项找不到。不幸的是,您必须递归执行此操作;每个依赖项都必须作为conda软件包可用才能正常工作。 - darthbith
好的,我不会把安装程序集成到bld.bat中,因为它根本行不通。我已经添加了conda-forge频道,并运行了conda update all。 现在正在运行,过程有进展我会及时向你汇报。谢谢! - dfresh22
也许您会对conda-smithy感兴趣。 - Sterling

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接