如何修复涉及Polyfit的NumPy错误



我最近将Python版本从3.8.5升级到3.9.0,看到我不得不重新安装所有模块,我很失望。我在Terminal中使用了这条线路来安装它:

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(

最新更新