Error: AttributeError: module'enum' has no attribute'IntFlag' (problems with labelme installation)

错误:AttributeError: module 'enum' has no attribute 'IntFlag'


最近在给python程序打包,需要用到pyinstaller 包,安装好之后在给程序打包的时候出现错误,虽然程序已经打包,但是打包好的程序并不能够正确执行!!!


1. Reason of error

The error is as follows:
Insert picture description here

This is because your enum is not a standard library enum module. You may have enum34 installed the package.
One way to check if this is the case is to check the property enum. file

import enum
print(enum.__file__)  
# standard library location should be something like 
# /usr/local/lib/python3.6/enum.py

2. Solution to the error: reference

Starting from python 3.6, the enum34 library is no longer compatible with the standard library. The library is also unnecessary, so you only need to uninstall it.
我安装的python版本是3.6.5版本的,所有直接卸载enum库即可
Insert picture description here
Uninstall enum34 library

pip uninstall enum34

 

After uninstalling, the problem is solved and you are done! ! !

Guess you like

Origin blog.csdn.net/u013066730/article/details/107860179