Why Python 3.6.1 throws AttributeError: module 'enum' has no attribute 'IntFlag'?

前端 未结 17 1438
无人共我
无人共我 2020-11-22 16:34

I just installed Python 3.6.1 for MacOS X

When I attempt to run the Console(or run anything with Python3), this error is thrown:

  AttributeError: mo         


        
17条回答
  •  天命终不由人
    2020-11-22 17:17

    In case you have to keep PYTHONPATH for both python2 and python3, you can write alias statements to set the proper PYTHONPATH in your bash_profile:

    Hardcode your PYTHONPATH2, and PYTHONPATH3 variables in your ~/.bash_profile, and add the following aliases at the end of it:

    alias python='export PYTHONPATH=${PYTHONPATH2};python'
    alias python3='export PYTHONPATH=${PYTHONPATH3};python3'
    

    My python (refers to python2) as I use python2 more often.

提交回复
热议问题