Проблема при установке pyautogui

При установке pyautogui на windows возникает проблема (python3.8):

C:\Users\X-User>pip install pyautogui
Collecting pyautogui
  Using cached PyAutoGUI-0.9.50.tar.gz (57 kB)
Collecting pymsgbox
  Using cached PyMsgBox-1.0.8.tar.gz (18 kB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\x-user\appdata\local\programs\python\python38\python.exe' 'c:\users\x-user\appdata\local\programs\python\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\X-User\AppData\Local\Temp\pip-build-env-zfeyr198\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 "c:\users\x-user\appdata\local\programs\python\python38\lib\runpy.py", line 193, in _run_module_as_main
      return _run_code(code, main_globals, None,
    File "c:\users\x-user\appdata\local\programs\python\python38\lib\runpy.py", line 86, in _run_code
      exec(code, run_globals)
    File "c:\users\x-user\appdata\local\programs\python\python38\lib\site-packages\pip\__main__.py", line 23, in <module>
      from pip._internal.cli.main import main as _main  # isort:skip # noqa
    File "c:\users\x-user\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\cli\main.py", line 5, in <module>
      import locale
    File "c:\users\x-user\appdata\local\programs\python\python38\lib\locale.py", line 16, in <module>
      import re
    File "c:\users\x-user\appdata\local\programs\python\python38\lib\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: 'c:\users\x-user\appdata\local\programs\python\python38\python.exe' 'c:\users\x-user\appdata\local\programs\python\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\X-User\AppData\Local\Temp\pip-build-env-zfeyr198\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.

Ответы (1 шт):

Автор решения: N3wb1e

Pyautogui работает только до версии python 3.7 . Если у тебя 3.8 нужно переустановить python на версию 3.7 , тогда все заработает :)

→ Ссылка