I am trying to convert my python code into an EXE file through Auto-py-to-exe which uses PyInstaller. I am running into a problem when I try to launch the EXE file. I have resolved some of the initial issues that arose with --hidden-import and --collect data, but I can't for the life of me find the solution to this one.
My program uses the PyQt5, and txtai[pipeline] modules as the main backbone of the program. In short, txtai has a TextToSpeech model. If this is the problem, then it might be easier to just find a different TTS model to use.
The program runs without issue through the .py file, but not when compiled.
My system information:
- OS: Windows 11
- Python Version: 3.11.7 (Conda)
- Auto-py-to-exe Version: 2.42.0
- PyInstaller Version: 6.3.0
The command I am using to run pyinstaller is as follows:
pyinstaller --noconfirm --onedir --windowed --icon "C:/Projects/GitHub/TextToVoice/icon.ico" --add-data "C:/Projects/GitHub/TextToVoice/AudioToMic.py;." --add-data "C:/Projects/GitHub/TextToVoice/icon.ico;." --add-data "C:/Projects/GitHub/TextToVoice/SpeechSynth.py;." --add-data "C:/Projects/GitHub/TextToVoice/userDict.txt;."--hidden-import "tiktoken_ext.openai_public" --hidden-import "tiktoken_ext" --collect-data "llama_cpp""C:/Projects/GitHub/TextToVoice/Main.py"
The Error I am receiving is (It comes in the form of a error prompt):
Failed to execute script 'Main' due to unhandled exception: could not get source codeTraceback (most recent call last): File "Main.py", line 8, in <module> import SpeechSynth as ss File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "SpeechSynth.py", line 2, in <module> from txtai.pipeline import TextToSpeech File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\__init__.py", line 8, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\app\__init__.py", line 5, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\app\base.py", line 12, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\embeddings\__init__.py", line 5, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\embeddings\base.py", line 17, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\graph\__init__.py", line 5, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\graph\base.py", line 14, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\graph\topics.py", line 5, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\pipeline\__init__.py", line 16, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\pipeline\train\__init__.py", line 7, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "txtai\pipeline\train\mlonnx.py", line 11, in <module> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "skl2onnx\__init__.py", line 15, in <module> from .convert import convert_sklearn, to_onnx, wrap_as_onnx_mixin # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "skl2onnx\convert.py", line 6, in <module> from .common._topology import convert_topology File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "skl2onnx\common\_topology.py", line 38, in <module> from ._container import ModelComponentContainer, _build_options File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "skl2onnx\common\_container.py", line 95, in <module> _apply_operation_specific = _get_operation_list() ^^^^^^^^^^^^^^^^^^^^^ File "skl2onnx\common\_container.py", line 49, in _get_operation_list source = inspect.getsource(v) ^^^^^^^^^^^^^^^^^^^^ File "inspect.py", line 1262, in getsource File "inspect.py", line 1244, in getsourcelines File "inspect.py", line 1081, in findsourceOSError: could not get source code
In case the output of auto-py-to-exe is important, here it is:
Running auto-py-to-exe v2.42.0Building directory: C:\Users\pewpe\AppData\Local\Temp\tmpl_9_psrtProvided command: pyinstaller --noconfirm --onedir --windowed --icon "C:/Projects/GitHub/TextToVoice/icon.ico" --add-data "C:/Projects/GitHub/TextToVoice/AudioToMic.py;." --add-data "C:/Projects/GitHub/TextToVoice/icon.ico;." --add-data "C:/Projects/GitHub/TextToVoice/SpeechSynth.py;." --add-data "C:/Projects/GitHub/TextToVoice/userDict.txt;." --hidden-import "tiktoken_ext.openai_public" --hidden-import "tiktoken_ext" --collect-data "llama_cpp" --collect-all "skl2onnx" --add-data "C:/Projects/GitHub/TextToVoice/Main.py;." "C:/Projects/GitHub/TextToVoice/Main.py"Executing: pyinstaller --noconfirm --onedir --windowed --icon C:/Projects/GitHub/TextToVoice/icon.ico --add-data C:/Projects/GitHub/TextToVoice/AudioToMic.py;. --add-data C:/Projects/GitHub/TextToVoice/icon.ico;. --add-data C:/Projects/GitHub/TextToVoice/SpeechSynth.py;. --add-data C:/Projects/GitHub/TextToVoice/userDict.txt;. --hidden-import tiktoken_ext.openai_public --hidden-import tiktoken_ext --collect-data llama_cpp --collect-all skl2onnx --add-data C:/Projects/GitHub/TextToVoice/Main.py;. C:/Projects/GitHub/TextToVoice/Main.py --distpath C:\Users\pewpe\AppData\Local\Temp\tmpl_9_psrt\application --workpath C:\Users\pewpe\AppData\Local\Temp\tmpl_9_psrt\build --specpath C:\Users\pewpe\AppData\Local\Temp\tmpl_9_psrt6104774 INFO: PyInstaller: 6.3.06104787 INFO: Python: 3.11.7 (conda)6104802 INFO: Platform: Windows-10-10.0.22621-SP06104819 INFO: wrote C:\Users\pewpe\AppData\Local\Temp\tmpl_9_psrt\Main.spec6106910 INFO: Extending PYTHONPATH with paths['C:\\Projects\\GitHub\\TextToVoice']6107317 INFO: Appending 'datas' from .spec6107337 INFO: checking Analysis6107338 INFO: Building Analysis because Analysis-03.toc is non existent6107355 INFO: Reusing cached module dependency graph...6107391 INFO: Caching module graph hooks...6107467 INFO: Running Analysis Analysis-03.toc6107479 INFO: Looking for Python shared library...6107500 INFO: Using Python shared library: C:\ProgramData\anaconda3\envs\tts\python311.dll6107501 INFO: Analyzing C:\Projects\GitHub\TextToVoice\Main.py6107516 INFO: Loading module hook 'hook-pynput.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6107953 INFO: Processing pre-safe import module hook six.moves from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.6108011 INFO: Loading module hook 'hook-PyQt5.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6108081 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6108813 INFO: Loading module hook 'hook-xml.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6109257 INFO: Loading module hook 'hook-numpy.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\numpy\\_pyinstaller'...6109330 WARNING: Conda distribution 'numpy', dependency of 'numpy', was not found. If you installed this distribution with pip then you may ignore this warning.6110015 INFO: Loading module hook 'hook-difflib.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6110661 INFO: Loading module hook 'hook-platform.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6110686 INFO: Loading module hook 'hook-sysconfig.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6111587 INFO: Loading module hook 'hook-psutil.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6112967 INFO: Processing pre-safe import module hook distutils from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-distutils.py'.6112972 INFO: Processing pre-find module path hook distutils from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.6113182 INFO: Loading module hook 'hook-distutils.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6113787 INFO: Loading module hook 'hook-torch.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6122166 INFO: hook-torch: raising recursion limit to 50006122217 INFO: Loading module hook 'hook-packaging.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6122523 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6125010 INFO: Loading module hook 'hook-sympy.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6134234 INFO: Loading module hook 'hook-scipy.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6134378 INFO: Loading module hook 'hook-pycparser.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6135161 INFO: Loading module hook 'hook-setuptools.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6136566 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6136726 INFO: Loading module hook 'hook-importlib_metadata.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6137452 INFO: Loading module hook 'hook-scipy.linalg.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6138492 INFO: Loading module hook 'hook-scipy.sparse.csgraph.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6139591 INFO: Loading module hook 'hook-scipy.spatial.transform.rotation.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6143819 INFO: Loading module hook 'hook-PIL.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6143891 INFO: Loading module hook 'hook-PIL.Image.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6144957 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6145227 INFO: Loading module hook 'hook-xml.dom.domreg.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6147798 INFO: Loading module hook 'hook-pandas.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6149030 INFO: Loading module hook 'hook-pytz.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6151324 INFO: Loading module hook 'hook-pandas.io.formats.style.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6152762 INFO: Loading module hook 'hook-pandas.plotting.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6153600 INFO: Loading module hook 'hook-openpyxl.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6153845 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6154924 INFO: Loading module hook 'hook-sqlalchemy.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6158660 INFO: Loading module hook 'hook-sqlite3.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6160045 INFO: Loading module hook 'hook-lz4.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6160518 INFO: Loading module hook 'hook-charset_normalizer.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6164927 INFO: Loading module hook 'hook-transformers.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6167946 INFO: Loading module hook 'hook-certifi.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6168123 INFO: Loading module hook 'hook-pydantic.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6169216 INFO: Loading module hook 'hook-pygments.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6172666 INFO: Loading module hook 'hook-anyio.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6173599 INFO: Processing pre-safe import module hook tensorflow from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-tensorflow.py'.6173623 INFO: Loading module hook 'hook-jinja2.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6176741 INFO: Loading module hook 'hook-torchvision.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6176851 INFO: Loading module hook 'hook-torchvision.io.image.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6176926 INFO: Loading module hook 'hook-scipy.io.matlab.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6180613 INFO: Processing pre-safe import module hook win32com from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.6185686 INFO: Loading module hook 'hook-sklearn.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6186265 INFO: Loading module hook 'hook-sklearn.utils.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6186698 INFO: Loading module hook 'hook-sklearn.metrics.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6188176 INFO: Loading module hook 'hook-sklearn.metrics.cluster.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6188309 INFO: Loading module hook 'hook-sklearn.cluster.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6188368 INFO: Loading module hook 'hook-sklearn.metrics.pairwise.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6188571 INFO: Loading module hook 'hook-sklearn.neighbors.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6188656 INFO: Loading module hook 'hook-sklearn.linear_model.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6190206 INFO: Loading module hook 'hook-timm.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6193157 INFO: Loading module hook 'hook-regex.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6204286 INFO: Loading module hook 'hook-nltk.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6206815 INFO: Loading module hook 'hook-pygame.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\pygame\\__pyinstaller'...6214811 INFO: Loading module hook 'hook-soundfile.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6220786 INFO: Loading module hook 'hook-pywt.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6221877 INFO: Loading module hook 'hook-uvicorn.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6224254 INFO: Loading module hook 'hook-sklearn.tree.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...6226646 INFO: Analyzing hidden import 'tiktoken_ext.openai_public'6226662 INFO: Analyzing hidden import 'skl2onnx.__main__'6226672 INFO: Analyzing hidden import 'skl2onnx.helpers.onnx_rare_helper'6226690 INFO: Analyzing hidden import 'skl2onnx.sklapi.register'6226722 INFO: Analyzing hidden import 'skl2onnx.tutorial'6226735 INFO: Analyzing hidden import 'skl2onnx.tutorial.imagenet_classes'6226767 INFO: Processing module hooks...6227050 WARNING: Hidden import "sklearn.neighbors._typedefs" not found!6232791 INFO: Loading module hook 'hook-encodings.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6233204 INFO: Loading module hook 'hook-heapq.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6233221 INFO: Loading module hook 'hook-pickle.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6233722 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6235770 WARNING: Hidden import "sip" not found!6235786 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6235895 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6236028 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6236136 INFO: Loading module hook 'hook-scipy.special._ellip_harm_2.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6236139 INFO: Loading module hook 'hook-scipy.special._ufuncs.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6236159 INFO: Loading module hook 'hook-scipy.stats._stats.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6236203 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6236895 INFO: Loading module hook 'hook-setuptools._distutils.command.check.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6237024 INFO: Loading module hook 'hook-sqlalchemy.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6237281 WARNING: Hidden import "pysqlite2" not found!6237295 WARNING: Hidden import "MySQLdb" not found!6237310 WARNING: Hidden import "psycopg2" not found!6237944 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6237964 INFO: checking Tree6237979 INFO: Building Tree because Tree-09.toc is non existent6237982 INFO: Building Tree Tree-09.toc6238041 INFO: checking Tree6238057 INFO: Building Tree because Tree-10.toc is non existent6238060 INFO: Building Tree Tree-10.toc6238079 INFO: checking Tree6238088 INFO: Building Tree because Tree-11.toc is non existent6238103 INFO: Building Tree Tree-11.toc6238187 INFO: Performing binary vs. data reclassification (2242 entries)6238565 INFO: Looking for ctypes DLLs6238966 WARNING: Ignoring /usr/lib64/libgomp.so.1 imported from C:\ProgramData\anaconda3\envs\tts\Lib\site-packages\torch\_inductor\codecache.py - only basenames are supported with ctypes imports!6239474 INFO: Analyzing run-time hooks ...6239521 INFO: Including run-time hook 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'6239536 INFO: Including run-time hook 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'6239542 INFO: Processing pre-find module path hook _pyi_rth_utils from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-_pyi_rth_utils.py'.6239551 INFO: Loading module hook 'hook-_pyi_rth_utils.py' from 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks'...6239566 INFO: Including run-time hook 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'6239584 INFO: Including run-time hook 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'6239600 INFO: Including run-time hook 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_setuptools.py'6239614 INFO: Including run-time hook 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyqt5.py'6239630 INFO: Including run-time hook 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\rthooks\\pyi_rth_nltk.py'6239644 INFO: Including run-time hook 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth__tkinter.py'6240109 INFO: Looking for dynamic libraries6249546 INFO: Extra DLL search directories (AddDllDirectory): ['C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\numpy.libs', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\scipy.libs', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\pygame', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\torch\\lib', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Library\\bin', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\torchvision', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\torchvision', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\torchvision', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\torchvision', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\pandas.libs', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyQt5\\Qt5\\bin', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\faiss_cpu.libs', 'C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\llama_cpp']6249551 INFO: Extra DLL search directories (PATH): ['C:\\ProgramData\\anaconda3\\envs\\tts\\Lib\\site-packages\\PyQt5\\Qt5\\bin']6253831 INFO: Warnings written to C:\Users\pewpe\AppData\Local\Temp\tmpl_9_psrt\build\Main\warn-Main.txt6254839 INFO: Graph cross-reference written to C:\Users\pewpe\AppData\Local\Temp\tmpl_9_psrt\build\Main\xref-Main.html6255200 INFO: checking PYZ6255203 INFO: Building PYZ because PYZ-03.toc is non existent6255213 INFO: Building PYZ (ZlibArchive) C:\Users\pewpe\AppData\Local\Temp\tmpl_9_psrt\build\Main\PYZ-03.pyz6264094 INFO: Building PYZ (ZlibArchive) C:\Users\pewpe\AppData\Local\Temp\tmpl_9_psrt\build\Main\PYZ-03.pyz completed successfully.6264266 INFO: checking PKG6264269 INFO: Building PKG because PKG-03.toc is non existent6264273 INFO: Building PKG (CArchive) Main.pkg6264340 INFO: Building PKG (CArchive) Main.pkg completed successfully.6264359 INFO: Bootloader C:\ProgramData\anaconda3\envs\tts\Lib\site-packages\PyInstaller\bootloader\Windows-64bit-intel\runw.exe6264373 INFO: checking EXE6264376 INFO: Building EXE because EXE-03.toc is non existent6264388 INFO: Building EXE from EXE-03.toc6264408 INFO: Copying bootloader EXE to C:\Users\pewpe\AppData\Local\Temp\tmpl_9_psrt\build\Main\Main.exe6264422 INFO: Copying icon to EXE6264438 INFO: Copying 0 resources to EXE6264451 INFO: Embedding manifest in EXE6264469 INFO: Appending PKG archive to EXE6264515 INFO: Fixing EXE headers6264768 INFO: Building EXE from EXE-03.toc completed successfully.6264816 INFO: checking COLLECT6264823 INFO: Building COLLECT because COLLECT-02.toc is non existent6264839 INFO: Building COLLECT COLLECT-02.toc6269195 INFO: Building COLLECT COLLECT-02.toc completed successfully.Moving project to: D:\DesktopComplete.
My project's source code can be found here: https://github.com/Myuku/HotKeyTextToVoice
I have tried --hidden-import "skl2onnx" and --add-data, but it doesn't do anything. I might be missing which part is missing and tinkering with skl2oonx might not be the problem. I have read that I need to obtain the source code for whatever package requires them, but I'm unsure which one I need and how.
Edit (01-27-2024):
I accidentally had some irrelevant imports in the requirements.txt so I have updated it.Additionally, as fasttext (used in txtai) doesn't work on windows, I had to use fasttext-wheel instead.
As such, to install the modules, you have to
- Remove txtai from the requirements.txt
- pip install -r requirements.txt
- pip install --no-deps git+https://github.com/neuml/txtai#egg=txtai[pipeline]
It should work fine after that.
Also for some reason, llama_cpp is required for it, so need to have VSC Desktop dev with C++.