How to install pyinstaller?

212 views
Skip to first unread message

Peng Yu

unread,
Jan 13, 2021, 3:15:41 AM1/13/21
to PyInstaller
I got the following error when I tried to install pyinstaller on Mac OS X 10.15.6. Does anybody know how to install it? Thanks.

$ pip3 install pyinstaller
Collecting pyinstaller
  Using cached pyinstaller-4.1.tar.gz (3.5 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/mktemp/pip-build-env-1sgtjczs/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (14 lines):
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/__main__.py", line 23, in <module>
      from pip._internal.cli.main import main as _main  # isort:skip # noqa
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 5, in <module>
      import locale
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 16, in <module>
      import re
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py", line 143, in <module>
      class RegexFlag(enum.IntFlag):
  AttributeError: module 'enum' has no attribute 'IntFlag'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/mktemp/pip-build-env-1sgtjczs/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

bwoodsend

unread,
Jan 14, 2021, 8:57:50 AM1/14/21
to PyInstaller

There’s an old 3rd party package called enum which is now obsolete because a near equivalent enum package is part of the Python standard lib. This old one shadows the standard lib one and breaks re which PyInstaller uses. All you need to do is get rid of the old one:

pip uninstall enum

Peng Yu

unread,
Jan 14, 2021, 10:00:20 AM1/14/21
to pyins...@googlegroups.com
> All you need to do is get rid of the old one:
>
> pip uninstall enum

But it says enum is not installed. Do you know what is wrong? Thanks.

$ pip3 uninstall enum
WARNING: Skipping enum as it is not installed.

--
Regards,
Peng
Reply all
Reply to author
Forward
0 new messages