ImportError:无法从“numpy”导入名称“int”

Aay*_*yas 4 python importerror scikit-learn

我试图sklearn通过编写类似的代码来导入库from sklearn.preprocessing import MinMaxScaler,但它一直显示相同的错误。

我尝试卸载并重新安装,但没有任何变化。命令提示符也给出同样的错误。最近我安装了一些 python 库,但这从未影响我的环境。

我还尝试在 jupyter 笔记本中运行代码。当我尝试导入numpylike时import numpy as np,它​​运行成功。所以问题仅在于sklearn.

另外,我以前工作过sklearn,但从未见过这样的错误。

小智 5

运行pip3 install --upgrade scipy 或升级任何尝试导入np.int但失败的 工具与 python 的np.int正常情况相同,而 scipy 对我来说已经过时了int