Pyinstaller: AttributeError: module 'enum' has no attribute 'IntFlag'

Created on 7 Jul 2018  路  1Comment  路  Source: pyinstaller/pyinstaller

When I try to package a simple .py file, I get the following error

Traceback (most recent call last):
  File "<string>", line 41, in <module>
  File "<string>", line 13, in walk_packages
  File "/usr/lib/python3.6/pkgutil.py", line 127, in iter_modules
    for name, ispkg in iter_importer_modules(i, prefix):
  File "/usr/lib/python3.6/pkgutil.py", line 146, in _iter_file_finder_modules
    import inspect
  File "/usr/lib/python3.6/inspect.py", line 41, in <module>
    import linecache
  File "/usr/lib/python3.6/linecache.py", line 11, in <module>
    import tokenize
  File "/usr/lib/python3.6/tokenize.py", line 33, in <module>
    import re
  File "/usr/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

my code

print("Test")

debug variables

161 INFO: PyInstaller: 3.3.1
161 INFO: Python: 3.6.5
162 INFO: Platform: Linux-4.15.0-24-generic-x86_64-with-Ubuntu-16.04-xenial
163 INFO: wrote /home/lucas/Code/.../run.spec
164 INFO: UPX is not available.
165 INFO: Extending PYTHONPATH with paths
duplicate

Most helpful comment

Please see https://github.com/pyinstaller/pyinstaller/issues/3146#issuecomment-354913915 for a solution.

Duplicate of #3146

>All comments

Please see https://github.com/pyinstaller/pyinstaller/issues/3146#issuecomment-354913915 for a solution.

Duplicate of #3146

Was this page helpful?
0 / 5 - 0 ratings