Я скомпилировал рабочий скрипт используя pyinstaller, но он весит слишком мало (5505 КБ) и при запуске выдает ошибку
Вот так происходит компиляция:
C:\Users\Ridalit.000\Desktop\Python\RIDLvoicePRINT (exe)>pyinstaller -F --windowed --hidden-import=pyttsx3.drivers --hidden-import=pyttsx3.drivers.dummy --hidden-import=pyttsx3.drivers.espeak --hidden-import=pyttsx3.drivers.nsss --hidden-import=pyttsx3.drivers.sapi5 print.py
215 INFO: PyInstaller: 3.6
215 INFO: Python: 3.7.8
215 INFO: Platform: Windows-10-10.0.18362-SP0
215 INFO: wrote C:\Users\Ridalit.000\Desktop\Python\RIDLvoicePRINT (exe)\print.spec
215 INFO: UPX is not available.
231 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Ridalit.000\\Desktop\\Python\\RIDLvoicePRINT (exe)',
'C:\\Users\\Ridalit.000\\Desktop\\Python\\RIDLvoicePRINT (exe)']
231 INFO: checking Analysis
369 INFO: checking PYZ
453 INFO: checking PKG
485 INFO: Building because C:\Users\Ridalit.000\Desktop\Python\RIDLvoicePRINT (exe)\build\print\print.exe.manifest changed
485 INFO: Building PKG (CArchive) PKG-00.pkg
3875 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
3875 INFO: Bootloader c:\users\ridalit.000\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe
3875 INFO: checking EXE
3906 INFO: Rebuilding EXE-00.toc because print.exe missing
3906 INFO: Building EXE from EXE-00.toc
3906 INFO: Appending archive to EXE C:\Users\Ridalit.000\Desktop\Python\RIDLvoicePRINT (exe)\dist\print.exe
4107 INFO: Building EXE from EXE-00.toc completed successfully.
А вот список модулей которые я использую:
import vk_api
import win32com.client
from vk_api.longpoll import VkLongPoll, VkEventType
import random
import os
from time import sleep
import re
import pyautogui
import pyttsx3
import json
import webbrowser
import sys