question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

numba 0.55.0 on `defaults` doesn't constrain numpy as expected

See original GitHub issue

When using Conda to create an environment with both Numba and NumPy, I notice that the linux-64 numba 0.55.0 package hosted on defaults doesn’t respect the max version constraint for NumPy like the conda-forge package does; this means it is possible to create an environment with numba 0.55 and numpy 1.22, which results in an ImportError when trying to import numba:

$ mamba create -n test numba=0.55 numpy=1.22
...
  + numba                0.55.0  py310h00e6091_0      pkgs/main/linux-64       Cached
  + numpy                1.22.1  py310h454958d_0      conda-forge/linux-64     Cached

If we limit the environment creation to only use conda-forge, this constraint is properly respected:

$ mamba create --override-channels -c conda-forge -n test numba=0.55 numpy=1.22
...
Encountered problems while solving:
  - package numba-0.55.0-py37h2d894fd_0 has constraint numpy >=1.18,<1.22 conflicting with numpy-1.22.0-py310h454958d_0

Is this different behavior between the two packages expected? I notice that before, the defaults hosted packages seemed to respect this constraint:

$ mamba create --override-channels -c defaults -n test numba=0.54 numpy=1.21
...
Encountered problems while solving:
  - package numba-0.54.1-py37h51133e4_0 has constraint numpy >=1.17,<1.21 conflicting with numpy-1.21.2-py310h20f2e39_0

For context, I observed this issue in https://github.com/dask-contrib/dask-sql/pull/383 - here is an example of potential downstream failures that can occur as a result of this.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
esccommented, Jan 27, 2022

@charlesbluca thank you, I can confirm this, but I do need to add -c conda-forge for it to resolve as 1.22 isn’t available from defaults at the time of writing:

conda create -c conda-forge -n testxyz numba=0.55 numpy=1.22
1reaction
esccommented, Jan 27, 2022

@charlesbluca I have forwarded this to the team that does defaults.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release Notes — Numba 0.56.4+0.g288a38bbd.dirty-py3.7 ...
This is a bugfix release to fix a regression in the CUDA target in relation to the .view() method on CUDA device arrays...
Read more >
Troubleshooting and tips — Numba 0.50.1 documentation
There can be various reasons why Numba cannot compile your code, and raises an error instead. One common reason is that your code...
Read more >
galpy.orbit.Orbits — galpy v1.7.2 documentation
cannot be combined with Quantity lists (2 and 3 above) 5) lists of scalar ... for fitting the orbit (can be Quantity) ntintJ=...
Read more >
numba - PyPI
Numba is an open source, NumPy-aware optimizing compiler for Python sponsored by Anaconda, Inc. It uses the LLVM compiler project to generate machine...
Read more >
conda-forge - :: Anaconda.org
annotated-types, 0.4.0, MIT, X, Reusable constraint types to use with typing.Annotated ... A wrapper around NumPy and other array libraries to make them....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found