网络编程
位置:首页>> 网络编程>> Python编程>> 解决python3.x安装numpy成功但import出错的问题

解决python3.x安装numpy成功但import出错的问题

作者:不懂音乐的欣赏者  发布时间:2023-12-29 22:33:44 

标签:python3.x,numpy,import

问题描述

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

来源:https://blog.csdn.net/qq_16775293/article/details/109515189

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com