原因:numpy与pandas版本不匹配!
下图中两版本匹配,重新安装即可。
1.进入你所在环境,分别卸载掉原有的numpy与pandas
2. 重新安装numpy与pandas,记住先安装numpy,然后安装pandas。
语句1:pip install numpy==1.21.5 -i https://pypi.tuna.tsinghua.edu.cn/simple some-package文章来源:https://www.toymoban.com/news/detail-516882.html
语句2:pip install pandas==1.4.3 -i https://pypi.tuna.tsinghua.edu.cn/simple some-package文章来源地址https://www.toymoban.com/news/detail-516882.html
到了这里,关于AttributeError: module ‘numpy‘ has no attribute ‘ndarray‘(最新版解决,综合多篇)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!