1

I am unable to import matplotlib or numpy.

trying to import the packages through cmd (opening a python console in cmd) and vscode throw different errors.

cmd error

 ** On entry to DGEBAL parameter number  3 had an illegal value
 ** On entry to DGEHRD  parameter number  2 had an illegal value
 ** On entry to DORGHR DORGQR parameter number  2 had an illegal value
 ** On entry to DHSEQR parameter number  4 had an illegal value
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\as116\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\__init__.py", line 107, in <module>
    from . import cbook, rcsetup
  File "C:\Users\as116\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\cbook\__init__.py", line 28, in <module>
    import numpy as np
  File "C:\Users\as116\AppData\Local\Programs\Python\Python38\lib\site-packages\numpy\__init__.py", line 305, in <module>
    _win_os_check()
  File "C:\Users\as116\AppData\Local\Programs\Python\Python38\lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
    raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Users\\as116\\AppData\\Local\\Programs\\Python\\Python38\\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: <tiniyurl not allowed to post here>

vscode error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'matplotlib'

I was experiencing multiple problems (regarding python and vscode)for unknown reasons and I had an assignment to complete so I had to reset (windows function which allows to keep personal files but removes apps) my pc today. I installed python 3.9 but uninstalled it and installed python 3.8.6 while trying find out the errors.

I could not install matplotlib and numpy at all before resetting my pc.

Akash
  • 31
  • 4
  • 4
    Does this answer your question? [How do you fix "runtimeError: package fails to pass a sanity check" for numpy and pandas?](https://stackoverflow.com/questions/64654805/how-do-you-fix-runtimeerror-package-fails-to-pass-a-sanity-check-for-numpy-an) – Tomerikoo Nov 05 '20 at 13:21

1 Answers1

-1

I had the same problem when using numpy1.19.4.

Installed 1.19.3 and worked...

From this thread How do you fix "runtimeError: package fails to pass a sanity check" for numpy and pandas? "This error occurs when using python3.9 and numpy1.19.4 So uninstalling numpy1.19.4 and installing 1.19.3 will work."

lscoughlin
  • 2,327
  • 16
  • 23
  • 1
    If you think this question already has an answer somewhere else on the site, flag it as a duplicate. Don't copy-paste and link another answer as an answer. I already flagged it as a duplicate for you, please avoid doing that in the answers in the future – Tomerikoo Nov 05 '20 at 13:20