numpy 在 win2004 及以上报错

Northword2020年11月14日
  • Others
大约 1 分钟

在 Windows 20H2 上运行 ASE 报错

 ase --version
 ** 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 "c:\users\northword\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\northword\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Northword\AppData\Roaming\Python\Python39\Scripts\ase.exe\__main__.py", line 4, in <module>
  File "C:\Users\Northword\AppData\Roaming\Python\Python39\site-packages\ase\__init__.py", line 8, in <module>
    import numpy as np
  File "C:\Users\Northword\AppData\Roaming\Python\Python39\site-packages\numpy\__init__.py", line 305, in <module>
    _win_os_check()
  File "C:\Users\Northword\AppData\Roaming\Python\Python39\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\\Northword\\AppData\\Roaming\\Python\\Python39\\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

Python 版本如下

Python 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32

Windows 版本如下:

版本         Windows 10 家庭中文版
版本号        20H2
安装日期      2020/11/2
操作系统版本   19042.610
序列号        
体验 Windows Feature Experience Pack 120.2212.31.0

搜索到一个类似问题的,是因为 numpywindows 20H2 的关系(反正总是 Windows 的锅)。

使用如下将 numpy 降级即可。

pip install numpy==1.19.3

引用地址:https://blog.csdn.net/yangtzech/article/details/109494653open in new windowhttps://tinyurl.com/y3dm3h86open in new window