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

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

Reason : I created a new .py file called numpy.py, which conflicted with the numpy module, 5555555. I thought it was because CV2 was installed. CV2 reinstalled numpy for me, the version was reduced, and numpy was uninstalled and reinstalled... I found myself in the back 55555

Solution: After renaming the file, it runs normally. Check whether the XXXXXXXX.py file has the same name as the package/module installed in the library, resulting in a conflict error report. If there is a conflict, it can run normally after modification.

 

Guess you like

Origin blog.csdn.net/luoyir1997/article/details/108076569