0

I'm using Pycharm IDE. When I run my code it shows some errors even if I clean all my code and write only "import pandas as pd".And pandas library has been installed before. please help me to solve this problem these are the errors:

Traceback (most recent call last):
  File "C:\Users\SAMIN\PycharmProjects\pythonProject1\main.py", line 1, in <module>
    import pandas as p
  File "C:\Users\SAMIN\PycharmProjects\pythonProject1\venv\lib\site-packages\pandas\__init__.py", line 11, in <module>
    __import__(dependency)
  File "C:\Users\SAMIN\PycharmProjects\pythonProject1\venv\lib\site-packages\numpy\__init__.py", line 305, in <module>
    _win_os_check()
  File "C:\Users\SAMIN\PycharmProjects\pythonProject1\venv\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\\SAMIN\\PycharmProjects\\pythonProject1\\venv\\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: (the page url to help)
M.rnnnn
  • 112
  • 2
  • 11

1 Answers1

0

There seems to be some issues with the latest version of numpy on Windows. Try uninstalling numpy and reinstall version 1.19.3:

pip uninstall numpy
pip install numpy==1.19.3

Src: How do you fix "runtimeError: package fails to pass a sanity check" for numpy and pandas?

GTBebbo
  • 1,198
  • 1
  • 8
  • 17