为什么 pycharm 给出导入 numpy 的错误

Why does pycharm gives error for importing numpy

在 pycharm 中,当我尝试导入 numpy 时,出现这样的运行时错误。

    Traceback (most recent call last):
  File "C:\Users\user\PycharmProjects\deneme\main.py", line 1, in <module>
    import numpy as np
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py", line 305, in <module>
    _win_os_check()
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\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\user\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://tinyurl .com/y3dm3h86 Process finished with exit code 1

我已经在网上搜索过了,有一个解决方案是“安装 1.19.3” 我已尝试安装 1.19.3 版本,但 pycharm 仍然报错。

尝试安装此版本:

python -m pip install numpy==1.19.3

来自 this Microsoft 线程修复程序将于 2021 年 1 月左右可用。 谢谢