Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“ImportError: Numba needs NumPy 1.21 or less” #185

Closed
tomvothecoder opened this issue Jul 28, 2022 · 0 comments · Fixed by #205
Closed

“ImportError: Numba needs NumPy 1.21 or less” #185

tomvothecoder opened this issue Jul 28, 2022 · 0 comments · Fixed by #205

Comments

@tomvothecoder
Copy link
Contributor

tomvothecoder commented Jul 28, 2022

Overview

Hi, some xcdat developers are running into an issue where incompatible versions of numba and numpy are being installed together. The xcdat package depends on xesmf, which depends on numba.

Root Cause

The numba conda recipe does not properly constrain the compatible numpy version based on the numba version.

There are related GH issues that have yet to be resolved:

As a result, conda/mamba sometimes successfully builds the xcdat (with the xesmf) package using incompatible versions of numba and numpy. We only find out these two packages are incompatible when we import <PACKAGE> and get “ImportError: Numba needs NumPy 1.21 or less”.

Possible Workaround

For xcdat, we constrained numba >=0.55.2 to ensure compatibility with numpy >= 1.22.

Here's the related issue and PR:

Version compatibility table

https://numba.readthedocs.io/en/stable/user/installing.html#version-support-information

Numba Release date Python NumPy llvmlite LLVM TBB
0.57.x TBC 3.8.x <= version < 3.12 1.19 <= version < 1.24 0.40.x 11.x 2021.x
0.56.x 2022-07-25 3.7.x <= version < 3.11 1.18 <= version < 1.23 0.39.x 11.x 2021.x
0.55.2 2022-05-25 3.7.x <= version < 3.11 1.18 <= version < 1.23 0.38.x 11.x 2021.x
0.55.{0,1} 2022-01-13 3.7.x <= version < 3.11 1.18 <= version < 1.22 0.38.x 11.x 2021.x
0.54.x 2021-08-19 3.6.x <= version < 3.10 1.17 <= version < 1.21 0.37.x 11.x 2021.x
0.53.x 2021-03-11 3.6.x <= version < 3.10 1.15 <= version < 1.21 0.36.x 11.x 2019.5 <= version < 2021.4
0.52.x 2020-11-30 3.6.x <= version < 3.9 1.15 <= version < 1.20 0.35.x 10.x (9.x for aarch64) 2019.5 <= version < 2020.3
0.51.x 2020-08-12 3.6.x <= version < 3.9 1.15 <= version < 1.19 0.34.x 10.x (9.x for aarch64) 2019.5 <= version < 2020.0
0.50.x 2020-06-10 3.6.x <= version < 3.9 1.15 <= version < 1.19 0.33.x 9.x 2019.5 <= version < 2020.0
0.49.x 2020-04-16 3.6.x <= version < 3.9 1.15 <= version < 1.18 0.31.x <= version < 0.33.x 9.x 2019.5 <= version < 2020.0
0.48.x 2020-01-27 3.6.x <= version < 3.9 1.15 <= version < 1.18 0.31.x 8.x (7.x for ppc64le) 2018.0.5 <= version < ?
0.47.x 2020-01-02 3.5.x <= version < 3.9; version == 2.7.x 1.15 <= version < 1.18 0.30.x 8.x (7.x for ppc64le) 2018.0.5 <= version < ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant