0

I have been stuck with this problem since a couple of days ago. I wanted to use numba for a project, so I created a conda environment in python=3.10.4

conda create -n scycom

Then I install the packages I need from the main repository

conda install numpy scipy numba matplotlib jupyter

which results in the installation of numpy=1.21.5 and numba=0.55.1

When I am done installing I run jupyter lab jupyter lab --port=8888 and create a notebook. When I type from numba import jit, I get the following error message

ImportError: Numba needs NumPy 1.21 or less

with a problem apparently arising with _ensure_critical_deps(). This is puzzling because numpy is version 1.21.5.

My attempts to fix this problem

  1. Given that it seemed a compatibility issues, I tried downgrading to numpy=1.20.1 but the problem persists and, sometimes, other compatibility issues with glib show up. In fact, the exact same error message arises

  2. I created an environment with python=3.8.13, with numpy=1.20.1 and numba=0.55.1, facing the exact same error messages

  3. I tried different combinations of libraries but I could solve this incompatibility

  4. I tried a few internet solutions but I did not find that any really fit into my problem

I hope somebody willing to help has faced and solved a similar issue

Jorge Alonso
  • 103
  • 11
  • 1
    check [1](https://stackoverflow.com/questions/70148065/numba-needs-numpy-1-20-or-less-for-shapley-import) [2](https://github.com/numba/numba/issues/7339) [3](https://numba.discourse.group/t/importerror-numba-needs-numpy-1-21-or-less/1225). Now, I have numba 0.55.1 and numpy 1.21.3. If you have problem with them yet, I suggest unistalling numpy and numba, and reinstall them again, preferably install numba at first then numpy if needed. – Ali_Sh Jun 21 '22 at 19:24
  • Add a flag. In fact, I also met the same error about NumPy version complained from Numba. But I am using the Numba source code to develop sth, rather than a pre-built python package. – Da Li Jun 23 '22 at 09:31

0 Answers0