numba==0.55.0 is broken with numpy==1.19.5 on Python 3.7
See original GitHub issueThe latest numba version (0.55.0) is broken when used with numpy==1.19.5
on Python 3.7 (e.g. a colab enviroment!).
Steps to reproduce
On a x86_64 linux machine:
virtualenv -p 3.7 venv
source venv/bin/activate
pip install numpy==1.19.5 numba==0.55.0
- In the python shell:
import numba
Error
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ascillitoe/Documents/Work/alibi_detect_test/venv3.7/lib/python3.7/site-packages/numba/__init__.py", line 38, in <module>
from numba.core.decorators import (cfunc, generated_jit, jit, njit, stencil,
File "/home/ascillitoe/Documents/Work/alibi_detect_test/venv3.7/lib/python3.7/site-packages/numba/core/decorators.py", line 12, in <module>
from numba.stencils.stencil import stencil
File "/home/ascillitoe/Documents/Work/alibi_detect_test/venv3.7/lib/python3.7/site-packages/numba/stencils/stencil.py", line 11, in <module>
from numba.core import types, typing, utils, ir, config, ir_utils, registry
File "/home/ascillitoe/Documents/Work/alibi_detect_test/venv3.7/lib/python3.7/site-packages/numba/core/ir_utils.py", line 16, in <module>
from numba.core.extending import _Intrinsic
File "/home/ascillitoe/Documents/Work/alibi_detect_test/venv3.7/lib/python3.7/site-packages/numba/core/extending.py", line 19, in <module>
from numba.core.pythonapi import box, unbox, reflect, NativeValue # noqa: F401
File "/home/ascillitoe/Documents/Work/alibi_detect_test/venv3.7/lib/python3.7/site-packages/numba/core/pythonapi.py", line 12, in <module>
from numba import _helperlib
ImportError: numpy.core.multiarray failed to import
More details
- The above works fine on Python 3.8 and 3.9.
- The specifc wheel pip used was
numba-0.55.0-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
. - Running
!pip install numba==0.55.0
and thenimport numba
in Google colab yields the same error (numpy==1.19.5
is the default here).
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
ImportError installing via PIP - Support - Numba Discussion
Hi, I'm trying to install numba via pip - i'm having trouble. Am I doing something wrong? ... numba==0.55.0 is broken with numpy==1.19.5...
Read more >Numba needs NumPy 1.20 or less for shapley import
I am trying to import shap. I am getting the following bug. I installed the lower version of NumPy still the problem is...
Read more >Release Notes — Numba 0.56.4+0.g288a38bbd.dirty-py3.7 ...
Version 0.56.4 (3 November, 2022) . This is a bugfix release to fix a regression in the CUDA target in relation to...
Read more >Installation — Numba 0.50.1 documentation
A C compiler compatible with your Python installation. If you are using Anaconda, you can use the following conda packages: Linux x86 :...
Read more >numba - PyPI
compiling Python code using LLVM. ... Numba is an open source, NumPy-aware optimizing compiler for Python sponsored by Anaconda, Inc. It uses the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @esc,
import numba
works for me in a 3.7 virtual env on my local machine now, and the relevant tests in our CI also appear to be passing too. Many thanks for fixing this so quickly!OK, I think I see what is happening on our internal system. Will confer with @esc and see if we can get a new wheel posted next week.