问题描述

windows错误安装方法:

pip3 install numpy

这种情况下虽然安装成功,但是在import numpy时会出现如下错误。

import numpy 
** 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

RuntimeError: The current Numpy installation (‘…\\numpy\\__init__.py’) fails to pass a sanity check due to a bug in the windows runtime.

解决方法

查了很多资料,最后得到的结果是:

numpy==1.19.3; platform_system == “Windows”
numpy==1.19.4; platform_system == “linux”

windows只能安装1.19.3,直接使用pip3 install命令安装的是最新的1.19.4版本,因此在安装时需要指定版本: 先卸载已安装版本

pip3 uninstall numpy

安装1.19.3版本

pip3 install numpy==1.19.3

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。