manrajgrover / halo

💫 Beautiful spinners for terminal, IPython and Jupyter
MIT License
2.86k stars 148 forks source link

Bug: AttributeError: module 'enum' has no attribute 'IntFlag' #1995 #127

Closed Casyfill closed 5 years ago

Casyfill commented 5 years ago

Description

On installing halo a few packages start complaining on enum (see error text below)

System settings

Error

Failed to import the site module
Traceback (most recent call last):
  File "/Users/philippk/anaconda3/envs/py36/lib/python3.6/site.py", line 541, in <module>
    main()
  File "/Users/philippk/anaconda3/envs/py36/lib/python3.6/site.py", line 522, in main
    known_paths = addusersitepackages(known_paths)
  File "/Users/philippk/anaconda3/envs/py36/lib/python3.6/site.py", line 282, in addusersitepackages
    user_site = getusersitepackages()
  File "/Users/philippk/anaconda3/envs/py36/lib/python3.6/site.py", line 258, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/Users/philippk/anaconda3/envs/py36/lib/python3.6/site.py", line 248, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/Users/philippk/anaconda3/envs/py36/lib/python3.6/sysconfig.py", line 608, in get_config_var
    return get_config_vars().get(name)
  File "/Users/philippk/anaconda3/envs/py36/lib/python3.6/sysconfig.py", line 587, in get_config_vars
    import _osx_support
  File "/Users/philippk/anaconda3/envs/py36/lib/python3.6/_osx_support.py", line 4, in <module>
    import re
  File "/Users/philippk/anaconda3/envs/py36/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

Steps to recreate

pip install dvc
pip install halo

dvc init (or anything else)

see https://github.com/iterative/dvc/issues/1995

manrajgrover commented 5 years ago

@Casyfill Thanks for opening this issue!

This must be because of enum34 being installed in Python3.6 which includes enum as a standard package. This dependency should be conditionally included which was fixed in one of the dependencies of halo but not released.

I've made a release today v0.0.25 which should fix this issue. Kindly check and let me know if you're still facing it.

manrajgrover commented 5 years ago

@Casyfill Closing this as it should be fixed.

Please let me know if it still persists.