@Guerro69

Проблема компиляции с Pyinstaller?

Я сделал программу на PySide2 и теперь её нужно скомпилировать в .exe и отправить друзьям, но при компиляции файла с помощью PyInstaller возникает странная ошибка с модулем "re" и "enum".
187 INFO: PyInstaller: 5.0.dev0
187 INFO: Python: 3.8.5
187 INFO: Platform: Windows-10-10.0.19041-SP0
187 INFO: wrote C:\Users\asus1\Desktop\python\impulse.spec
203 INFO: UPX is not available.
218 INFO: Extending PYTHONPATH with paths
['C:\\Users\\asus1\\Desktop\\python',
 'C:\\Users\\asus1\\Desktop\\python']
pygame 2.0.0 (SDL 2.0.12, python 3.8.5)
Hello from the pygame community. https://www.pygame.org/contribute.html
327 INFO: checking Analysis
327 INFO: Building Analysis because Analysis-00.toc is non existent
327 INFO: Initializing module dependency graph...
327 INFO: Caching module graph hooks...
359 INFO: Analyzing base_library.zip ...
Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\traceback.py", line 5, in <module>
    import linecache
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\linecache.py", line 11, in <module>
    import tokenize
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\tokenize.py", line 32, in <module>
    import re
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\re.py", line 145, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\traceback.py", line 5, in <module>
    import linecache
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\linecache.py", line 11, in <module>
    import tokenize
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\tokenize.py", line 32, in <module>
    import re
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\re.py", line 145, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
7778 INFO: Processing pre-find module path hook distutils from 'c:\\users\\asus1\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
7778 INFO: distutils: retargeting to non-venv dir 'c:\\users\\asus1\\appdata\\local\\programs\\python\\python38-32\\lib'
12683 INFO: Caching module dependency graph...
13027 INFO: running Analysis Analysis-00.toc
13089 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by c:\users\asus1\appdata\local\programs\python\python38-32\python.exe
13417 INFO: Analyzing C:\Users\asus1\Desktop\python\Bombers\impulse.py
15057 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'c:\\users\\asus1\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-urllib3.packages.six.moves.py'.
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\site-packages\urllib3\__init__.py", line 7, in <module>
    from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\site-packages\urllib3\connectionpool.py", line 3, in <module>
    import logging
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\logging\__init__.py", line 26, in <module>
    import sys, os, time, io, re, traceback, warnings, weakref, collections.abc
  File "c:\users\asus1\appdata\local\programs\python\python38-32\lib\re.py", line 145, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
pre-safe-import-module hook failed, needs fixing.
  • Вопрос задан
  • 242 просмотра
Решения вопроса 1
sanya84
@sanya84
Фанатик Python 3
pip uninstall -y enum34
And repeat the assembly.
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
phaggi
@phaggi
лужу, паяю, ЭВМы починяю
Нет, не проблема компиляции с Pyinstaller.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы