RINCODE
@RINCODE
Я новичок, еще учусь

Как скомпилировать файл в exe?

Всем привет! Мне нужно скомпилировать проект в exe файл, пытался использовать pyinstaller, но после запуска программы, показывается текст и программа закрывается.
Использую следующие библиотеки, помогите пж)
import numpy as np
import pyscreenshot as ImageGrab
from PIL import Image
import pytesseract,pyperclip,time,cv2
import translators as ts
import threading
from AutoHotPy import AutoHotPy
from InterceptionWrapper import *
import pymysql

Python 3.9
Надеюсь поможете)
Решил еще добавить строку из консоли, что бы была возможность посмотреть в чем проблема( PS не хочу сливать сюда код)
C:\Users\HP\PycharmProjects\pythonProject\.idea\Bots>pyinstaller -F Perevodchik.py
120 INFO: PyInstaller: 5.0.dev0
120 INFO: Python: 3.9.4
121 INFO: Platform: Windows-10-10.0.19041-SP0
122 INFO: wrote C:\Users\HP\PycharmProjects\pythonProject\.idea\Bots\Perevodchik.spec
123 INFO: UPX is not available.
125 INFO: Extending PYTHONPATH with paths
['C:\\Users\\HP\\PycharmProjects\\pythonProject\\.idea\\Bots',
 'C:\\Users\\HP\\PycharmProjects\\pythonProject\\.idea\\Bots']
136 INFO: checking Analysis
136 INFO: Building Analysis because Analysis-00.toc is non existent
136 INFO: Initializing module dependency graph...
138 INFO: Caching module graph hooks...
144 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
147 INFO: Analyzing base_library.zip ...
1968 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
1969 INFO: distutils: retargeting to non-venv dir 'c:\\program files\\python39\\lib'
4444 INFO: Caching module dependency graph...
4598 INFO: running Analysis Analysis-00.toc
4612 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by c:\program files\python39\python.exe
4693 WARNING: lib not found: api-ms-win-core-path-l1-1-0.dll dependency of c:\program files\python39\python39.dll
4698 INFO: Analyzing C:\Users\HP\PycharmProjects\pythonProject\.idea\Bots\Perevodchik.py
5471 INFO: Processing pre-find module path hook site from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
5472 INFO: site: retargeting to fake-dir 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\fake-modules'
7044 INFO: Processing pre-safe import module hook setuptools.extern.six.moves from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-setuptools.extern.six.moves.py'.
10001 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-urllib3.packages.six.moves.py'.
11383 INFO: Processing module hooks...
11384 INFO: Loading module hook 'hook-certifi.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
11390 INFO: Loading module hook 'hook-cv2.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
11393 INFO: Loading module hook 'hook-lxml.etree.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
11393 INFO: Loading module hook 'hook-lxml.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
11679 INFO: Loading module hook 'hook-pycparser.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
11680 INFO: Loading module hook 'hook-win32ctypes.core.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
11821 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
11824 INFO: Loading module hook 'hook-distutils.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
11824 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
11827 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
11889 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
11891 INFO: Loading module hook 'hook-lib2to3.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
11975 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
11978 INFO: Loading module hook 'hook-numpy.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
12032 INFO: Import to be excluded not found: 'f2py'
12048 INFO: Loading module hook 'hook-numpy._pytesttester.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
12049 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
12051 INFO: Loading module hook 'hook-PIL.Image.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
12292 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
12294 INFO: Loading module hook 'hook-PIL.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
12297 INFO: Import to be excluded not found: 'FixTk'
12298 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
12300 INFO: Import to be excluded not found: 'FixTk'
12300 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
12603 INFO: Processing pre-safe import module hook win32com from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
12951 WARNING: Hidden import "pkg_resources.py2_warn" not found!
13164 WARNING: Hidden import "pkg_resources.markers" not found!
13166 INFO: Loading module hook 'hook-PyQt5.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
13266 WARNING: Hidden import "sip" not found!
13267 INFO: Loading module hook 'hook-PyQt5.Qt.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
13299 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
13387 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
13547 INFO: Loading module hook 'hook-PyQt5.QtHelp.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
13873 INFO: Loading module hook 'hook-PyQt5.QtMultimedia.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
14243 INFO: Loading module hook 'hook-PyQt5.QtNetwork.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
14470 INFO: Loading module hook 'hook-PyQt5.QtOpenGL.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
14787 INFO: Loading module hook 'hook-PyQt5.QtPrintSupport.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
15104 INFO: Loading module hook 'hook-PyQt5.QtQml.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
15457 INFO: Loading module hook 'hook-PyQt5.QtQuick.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
15702 INFO: Loading module hook 'hook-PyQt5.QtQuickWidgets.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
16070 INFO: Loading module hook 'hook-PyQt5.QtSensors.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
16192 INFO: Loading module hook 'hook-PyQt5.QtSerialPort.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
16316 INFO: Loading module hook 'hook-PyQt5.QtSql.py' from 'C:\\Users\\HP\\AppData\\Roaming\\Python\\Python39\\site-packages\\PyInstaller\\hooks'...
16625 INFO: Loading module hook 'hook-PyQt5.QtSvg.py' from
Последние строчки пришлось подтереть, т.к. слишком много символов
  • Вопрос задан
  • 505 просмотров
Пригласить эксперта
Ответы на вопрос 2
HemulGM
@HemulGM Куратор тега Python
Delphi Developer, сис. админ
Питон не компилируется
Ответ написан
@NickQ_Q
13266 WARNING: Hidden import "sip" not found!
Ответ написан
Комментировать
Ваш ответ на вопрос

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

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