【发布时间】:2018-11-24 11:04:02
【问题描述】:
我已经阅读并尝试了这里的每个 cmets:Why Python 3.6.1 throws AttributeError: module 'enum' has no attribute 'IntFlag'? 但仍然没有帮助。
我使用的是 Pycharm Pycharm 2018.3 社区版,我的 Python 版本是 3.7
每次我尝试为 Pycharm 设置解释器时都会出现此错误:
Error in sitecustomize;
set PYTHONVERBOSE for traceback: AttributeError: module 'enum' has no attribute 'IntFlag'
Traceback (most recent call last): File "/Applications/PyCharm CE.app/Contents/helpers/packaging_tool.py", line 2, in <module>
import traceback File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/traceback.py", line 5, in <module>
import linecache File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/linecache.py", line 11, in <module>
import tokenize File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tokenize.py", line 33, in <module>
import re File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py", line 143, in <module>
class RegexFlag(enum.IntFlag): AttributeError: module 'enum' has no attribute 'IntFlag'
希望得到帮助。
【问题讨论】:
-
你在某处有一个名为
enum.py的文件吗?