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 is broken with numpy==1.19.5 on Python 3.7

See original GitHub issue

The 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:

  1. virtualenv -p 3.7 venv
  2. source venv/bin/activate
  3. pip install numpy==1.19.5 numba==0.55.0
  4. 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 then import numba in Google colab yields the same error (numpy==1.19.5 is the default here).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ascillitoecommented, Jan 14, 2022

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!

1reaction
seibertcommented, Jan 14, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

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