已解决AttributeError: module ‘enum‘ has no attribute ‘IntFlag‘?
报错问题
之前在工作中遇到过这个坑,记录一下问题以及解决方法,不一定针对所有情况都能用,但是可以供大家参考。
问题描述如下:
AttributeError: module ‘enum’ has no attribute ‘IntFlag’?
解决方法
这可能是由包Enum34引起的。因为Python3.4有一个标准库枚举模块,所以您应该卸载Enum34,因为在Python3.6中添加了Enum.Intflag,所以它不再与标准库中的枚举兼容。
pip uninstall enum34 #卸载enum34
PS
有问题评论区留言即可