1

I'm new in Python and I had met a problem that I can't run a code using NumPy. It always shows this error:

Exception has occurred: RuntimeError The current Numpy installation ('C:\Users\Username\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\init.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://developercommunity.visualstudio.com/content/problem/1207405/fmod-after-an-update-to-windows-2004-is-causing-a.html File "C:\Users\Username\Desktop\just_a_testing.py", line 1, in import numpy as np

I already tried using other's project to exclude my code's problem but it's also not working. Besides, I also reinstalled matplotlib and numpy packages but still get this error. Can someone help me?

Slimer0210
  • 13
  • 2
  • 1
    i would remove every trace of this python installation from your machine and start over with the Anaconda distribution – Paul H Dec 03 '20 at 01:37

2 Answers2

0

This error occurs when using python 3.9 and numpy 1.19.4 So try uninstalling numpy 1.19.4 and then re-installing 1.19.3 using pip install numpy==1.19.3

Wasif
  • 14,755
  • 3
  • 14
  • 34
0

Try this in your command prompt

pip uninstall numpy
python -m pip install numpy==1.19.3
Vidya Ganesh
  • 788
  • 11
  • 24