Conda build unsatisfiable dependencies error with pint

可紊 提交于 2019-12-23 16:00:34

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/45866648/conda-build-unsatisfiable-dependencies-error-with-pint

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!