How do I pin to a numpy version?

0 views
Skip to first unread message

Chris Barker

unread,
Jun 27, 2016, 7:11:09 PM6/27/16
to conda
I've got a python extension module (Cython) that directly calls the numpy API. so I want the conda package to be pinned to a particular numy version. How do I do that?

I've got numpy as both a build and install dependency  in the meta-yaml, but I'm getting unpinned conda packages.

-Thanks,

-CHB


--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris....@noaa.gov

Matt Craig

unread,
Jun 27, 2016, 7:13:28 PM6/27/16
to Chris Barker, conda
Are you using numpy or numpy x.x?

You need the latter, in the run section, to pin the version.

Matt


--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/CALGmxE%2Bn9r%3Dz88E1ZYtafXU1mQ36W7%3DtLgDRnsFKUoH1Lj62yw%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Chris Barker

unread,
Jun 27, 2016, 7:18:03 PM6/27/16
to Matt Craig, conda
On Mon, Jun 27, 2016 at 4:13 PM, Matt Craig <mattw...@gmail.com> wrote:
Are you using numpy or numpy x.x?

You need the latter, in the run section, to pin the version.

bingo! thanks. That seems to be doing the job.

run section or build section? or both?

-CHB

Chris Barker

unread,
Jun 27, 2016, 7:26:09 PM6/27/16
to Matt Craig, conda
Matt,

while I"ve got you online -- how do you get this to work with conda-build-all?

I'm doing:

$ conda-build-all ./ --matrix-conditions "python 2.7.*" "numpy >=1.11"

and getting:

Traceback (most recent call last):

  File "/Users/chris.barker/miniconda2/bin/conda-build-all", line 9, in <module>

    load_entry_point('conda-build-all==0.13.1', 'console_scripts', 'conda-build-all')()

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build_all/cli.py", line 85, in main

    b.main()

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build_all/builder.py", line 213, in main

    recipe_metas = self.fetch_all_metas()

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build_all/builder.py", line 152, in fetch_all_metas

    recipe_metas = sort_dependency_order(recipe_metas)

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build_all/builder.py", line 99, in sort_dependency_order

    meta.parse_again(permit_undefined_jinja=True)

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build/metadata.py", line 377, in parse_again

    self.meta = parse(self._get_contents(permit_undefined_jinja), path=self.meta_path)

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build/metadata.py", line 666, in _get_contents

    env.globals.update(context_processor(self, path))

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build/jinja_context.py", line 130, in context_processor

    ctx = get_environ(m=initial_metadata)

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build/environ.py", line 174, in get_dict

    d.update(meta_vars(m))

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build/environ.py", line 277, in meta_vars

    d['PKG_BUILD_STRING'] = str(meta.build_id())

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build/metadata.py", line 506, in build_id

    for ms in self.ms_depends():

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build/metadata.py", line 478, in ms_depends

    ms = handle_config_version(ms, ver, typ)

  File "/Users/chris.barker/miniconda2/lib/python2.7/site-packages/conda_build/metadata.py", line 320, in handle_config_version

    raise RuntimeError("'%s' requires external setting" % ms.spec)

RuntimeError: 'numpy x.x' requires external setting


right off the bat -- it hasn't even gotten to building the particular package yet...

-CHB






On Mon, Jun 27, 2016 at 4:13 PM, Matt Craig <mattw...@gmail.com> wrote:

Matt Craig

unread,
Jun 27, 2016, 9:43:10 PM6/27/16
to Chris Barker, conda
Hi Chris,

There may be other issues too, but the runtime error goes away if you set CONDA_NPY. The value doesn't matter. Can you open a conda-build-all issue for this?

Thanks,
Matt Craig
Reply all
Reply to author
Forward
0 new messages