I have a valid pip package that I am trying to put onto the Anaconda.org server. I created the meta.yaml file with conda skeleton, which includes the requirement for pint (no particular version selected, so it should default to the latest.) However, when I attempt to build the package with conda build, conda raises this error:
raise DependencyNeedsBuildingError(exc, subdir=subdir)
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform osx-64: ['pint']
However, there is a pint that is built for osx-64... both in conda and in pip and on my machine - it's the one I use to run my pip package. What repository is conda hunting through to find that requirement and how can I specify the correct pint to use in meta.yaml?
            Asked
            
        
        
            Active
            
        
            Viewed 4,044 times
        
    9
            
            
        
        merv
        
- 67,214
 - 13
 - 180
 - 245
 
        Ethan Keller
        
- 963
 - 3
 - 10
 - 26
 
1 Answers
9
            Conda is hunting through the channels in your configuration, which you can view with the command
conda config --get channels
(or conda config --show). Conda build always installs packages from the repositories (which is to say it doesn't rely on packages you have installed locally) because that is what a general user will do when they install your package. In your case, you need to add a channel to pick up the pint package; you can find a suitable channel by searching on Anaconda.org, and in this case, the conda-forge channel (among others, but that's the one I'd recommend) has the pint package. You can add the channel to your configuration with
conda config --add channels conda-forge
or you can use it for this single build with the -c option to conda build:
conda build -c conda-forge your_package_name
See conda-build for more information.
        Max Ghenis
        
- 14,783
 - 16
 - 84
 - 132
 
        darthbith
        
- 18,484
 - 9
 - 60
 - 76
 
- 
                    If someone else has to build this, how do I communicate the channels they need to add within my package? I assume within the meta.yaml... Is there a standard way of specifying these build-requirement channels? – Ethan Keller Aug 24 '17 at 19:03
 - 
                    Not as far as I know. Since many channels can resolve a dependency (in general), the package maintainer shouldn't force people to use a particular channel. You can mention it in your docs though, so your users know what to do :-) – darthbith Aug 24 '17 at 22:20