I'm using homebrew
as my package manager. While installing python3
with brew install python3
I am getting the following error
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
I've tried the steps outlined in homebrew Troubleshooting but the problem still exists. Any pointers would be helpful.
Best Answer
Once you have determined that it's not a
homebrew
problem using their troubleshooting guide my first suspicion would be that you are picking up the wrong version of theenum
module. Make sure you are not settingPYTHONPATH
anywhere (echo $PYTHONPATH
at the command line will tell you) and try again.The other possibility I would check is that you are running the right version of Python.
which python
should return/usr/bin/python
(the version Apple installs), if not then you might want to check your PATH shell variable and temporarily set it to something else.