Categories
Python Answers

How to fix Python throwing AttributeError: module ‘enum’ has no attribute ‘IntFlag’?

Spread the love

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.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *