Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conda build unsatisfiable dependencies error with pint

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?

like image 667
Ethan Keller Avatar asked Aug 24 '17 16:08

Ethan Keller


1 Answers

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.

like image 71
darthbith Avatar answered Sep 23 '22 01:09

darthbith