python - 如何解决这个涉及 Polyfit 的 NumPy 错误?
问题描述
我最近将我的 Python 版本从 3.8.5 升级到了 3.9.0,我很失望地看到我不得不重新安装我的所有模块。我在终端中使用了这一行来安装它:
pip3 install --upgrade numpy
它似乎工作正常,没有警告或任何东西。但是,当我实际尝试导入它时,我收到此错误:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import numpy as np
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/__init__.py", line 286, in <module>
raise RuntimeError(msg)
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned
我不是在编译自己;我使用 pip 安装了它。这在使用 3.8.5 时从未发生过。如果有帮助,我正在使用 Mac。我该如何解决这个错误?
解决方案
看起来我已经解决了这个问题,1,通过 pvenv 安装一个新环境。(之前我用的是virtualenv) 2、安装python 3.7.1(之前我用的是3.9)
推荐阅读
- arrays - Excel 动态数组运行重复次数
- node.js - Sequelize:强制更新 JSON 数组
- go - 无法使用 net.Conn.Read 从 UNIX 套接字读取
- python - 有没有更快的方法来根据重复值的数量过滤 Pandas 数据框?
- javascript - 如何解决大小写检查器的问题?
- c - 在尝试编写将文件分解为多个 JPG 的程序时不断出现分段错误
- eclipse - EclipseMercurial 下载
- javascript - 如何获取 jQuery AJAX POST 成功对象的内容长度标头?
- angular - 从 Angular 材质原生组件创建两个值范围滑块
- discord.js - Discord.Message.Embed 不是构造函数