I have a code block that works in idle, but not in cmd or double-clicking the file. For some reason, importing tkinter causes the following error.
Traceback (most recent call last):
File "C:\path\main.pyw", line 20, in <module>
import tkinter as Tkinter
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\tkinter\__init__.py", line 39, in <module>
import re
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
no matter where I put the import, this happens, it happens on multiple computers, and the code works perfectly fine in idle. I am running python 3.6.6, on windows 10. i have already tried using python -i main.py
in cmd and running the program with pythonw (as that's the interpreter that idle uses)