3

Building my first conda package from a local dir. following instructions from CONDA site. https://conda.io/docs/user-guide/tasks/build-packages/recipe.html

i get the following error

conda_build.exception.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform win-64: set([u'pywinauto', u'statistics', u'openturns'])

I tried several items, however it seems the pywinauto, statistics and openturns are causing dependency issues.

here is my meta.yml file

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]
dfresh22
  • 961
  • 1
  • 15
  • 23

1 Answers1

4

All of the packages that you use in a conda build have to be available as conda packages in one of the channels in your configuration. For your case:

darthbith
  • 18,484
  • 9
  • 60
  • 76
  • when I remove pywinauto, it fails to build, producing the same error, just with the following names (openturns, statistics), i would assume because they are on the conda-forge channel, it would just pull them normally without error. this is not the case for the pywinauto, when I attempt to run 'conda skeleton pypi pywinauto' this returns an import error no packages found I might just add the to bld.bat script the following conda install -c conda-forge openturns -y conda install -c conda-forge statistics -y pip install pywinauto – dfresh22 Sep 26 '17 at 17:14
  • 1
    1. You need to add `conda-forge` to your channel list with `conda config --append channels conda-forge` before you build the package or specify the channel in the build step `conda build -c conda-forge recipe_dir`. Otherwise how does conda know where to find the package? – darthbith Sep 26 '17 at 21:05
  • 2. You should definitely not do installation during the build step. How will your users get the dependencies they need if you do the installation during the build step? IIRC, conda-build actually prohibits this from happening, but that might not be correct. I know that it prohibits installing packages automatically via setuptools during the install process – darthbith Sep 26 '17 at 21:07
  • 3. I had no problem running `conda skeleton pypi pywinauto` just now (although I'm running on Linux...). Maybe try again, and if it doesn't work, consider posting a new question :-) I did have a problem trying to build `pywinauto` because one of its dependencies couldn't be found. You have to do this recursively, unfortunately; every dependency has to be available as a conda package for it to work. – darthbith Sep 26 '17 at 21:08
  • good call, I will not be building the install into the bld.bat as it just wont work. I already had the conda-forge channel added, and I ran a conda update all am running now, will keep you posted. Thank You! – dfresh22 Sep 26 '17 at 22:51
  • perhaps [conda-smithy](https://github.com/conda-forge/conda-smithy) is of interest – Sterling Oct 21 '21 at 08:18