Sometimes, we want to fix Python throwing AttributeError: module ‘enum’ has no attribute ‘IntFlag’.
In this article, we’ll look at how to fix Python throwing AttributeError: module ‘enum’ has no attribute ‘IntFlag’.
How to fix Python throwing AttributeError: module ‘enum’ has no attribute ‘IntFlag’?
To fix Python throwing AttributeError: module ‘enum’ has no attribute ‘IntFlag’, we uninstall the enum34
package.
To uninstall it, we run
pip uninstall -y enum34
Then we can use the enum
module that comes with the standard library of Python 3.6 or later.
Conclusion
To fix Python throwing AttributeError: module ‘enum’ has no attribute ‘IntFlag’, we uninstall the enum34
package.