-2

I tried to import numpy and I recieved the following error: "raise ImportError("Numba needs NumPy 1.21 or less") ImportError: Numba needs NumPy 1.21 or less" we already downloaded numba 0.48 and numpy 1.18.1 and it still asks to use numpy 1.21 or less. can anyone helps me on this issue? I attached 2 screenshots, one is the code and the other one is the error message.Thanks

New contributor
Ben Lechner is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2
  • You downloaded NumPy 1.18.1, but how did you install it? Did you create a clean environment, or overwrite the old installation? With pip, it would be pip install numpy==1.18.1.
    – 9769953
    2 hours ago
  • Hi, I already fixed the problem. I used the command line in the terminal "pip install numpy==1.18.1" it uninstalled the numpy version 1.22, our version and installed 1.18.1 instead. Thanks for helping us 1 hour ago

1 Answer 1

0

if you are not using virtual enivrements, i suggest you install and use ANACONDA.
Solution:
for this error i think using Numpy==1.21.4 and Numba==0.53.0 will solve your problem.

2
  • Hi, we already run python on VMware on Ubuntu and when we wrote pip show numpy it showed us that we use Numpy 1.22 even though we downloaded Numpy 1.18.1 1 hour ago
  • > pip uninstall numpy , then make sure you have no numpy installed on your env, then >pip install numpy==VERSION 1 hour ago

Your Answer

Ben Lechner is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.