【python_error】AttributeError: module ‘numpy‘ has no attribute ‘dtype‘

报错:AttributeError: module 'numpy' has no attribute 'dtype'

原因我new了一个.py文件叫numpy.py,与numpy模块冲突了,5555555,我还以为是装了CV2,CV2给我重装了numpy,版本降低,又把numpy卸载了重装……后面发现自己憨憨55555

解决方法:重命名文件后,运行正常。检查是否XXXXXXXX.py文件与库中安装的包/模块同名,导致的冲突报错,若有冲突则修改后即可正常运行。

 

猜你喜欢

转载自blog.csdn.net/luoyir1997/article/details/108076569