AttributeError: module ‘numpy‘ has no attribute ‘ndarray‘(最新版解决,综合多篇)

原因:numpy与pandas版本不匹配!

            下图中两版本匹配,重新安装即可。

AttributeError: module ‘numpy‘ has no attribute ‘ndarray‘(最新版解决,综合多篇)

1.进入你所在环境,分别卸载掉原有的numpy与pandas

AttributeError: module ‘numpy‘ has no attribute ‘ndarray‘(最新版解决,综合多篇)

2. 重新安装numpy与pandas,记住先安装numpy,然后安装pandas。

语句1:pip install numpy==1.21.5 -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

语句2:pip install pandas==1.4.3 -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/06800e8010.html