Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyQt6 MVC to .exe #8066

Closed
armend26 opened this issue Nov 3, 2023 · 13 comments
Closed

PyQt6 MVC to .exe #8066

armend26 opened this issue Nov 3, 2023 · 13 comments
Labels
kind:support solution:not enough info Not enough info has been provided to solve or help. Fill out the issue template

Comments

@armend26
Copy link

armend26 commented Nov 3, 2023

Hello,

I'm trying to create an executable file for my project, but so far, it hasn't worked. My project is quite extensive, and I'm using an MVC folder structure.

Can anyone give a suggestion on how I can solve this problem?

@armend26 armend26 added the triage Please triage and relabel this issue label Nov 3, 2023
@rokm
Copy link
Member

rokm commented Nov 3, 2023

If you want help with specific problem, you will need to provide an error message and/or code example - we have no way of guessing what your code looks like.

Also, if you are new to PyInstaller, I would recommend you start with creating executable from simple PyQt6 hello world application to familiarize yourself with the tool, and then gradually scale up the complexity. Trying to build a complex project on the first try is likely going to be daunting, especially if you have no understanding of how data files are (not) collected, why some modules need to be specified as hidden imports, etc.

@rokm rokm closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2023
@rokm rokm added solution:not enough info Not enough info has been provided to solve or help. Fill out the issue template kind:support and removed triage Please triage and relabel this issue labels Nov 3, 2023
@armend26
Copy link
Author

armend26 commented Nov 3, 2023

To better understand my question :

This is my app.py

import sys
from controller import Controller

def main():
 
    controller = Controller()
    sys.exit(controller.runApp())


if __name__ == "__main__":
    main()

Now controller.py would be in the same folder as app.py

class Controller:
    def __init__(self):

The same case for the main_window.py.

I have also some static files (images etc.) which are stored in a different folder.

The error I'm getting when I run the .exe is:
error

@rokm
Copy link
Member

rokm commented Nov 3, 2023

If controller.py is next to app.py, it should be found by the analysis, because we explicitly add the parent directory of entry-point script to the search path. Unless this directory also contains an __init__.py, in which case we treat the directory as a package, and try adding its parent directory to the search path (unless it also contains an __init__.py, in which case we try one directory higher again...).

Is this the case here - do you have an __init__.py next to app.py?

@armend26
Copy link
Author

armend26 commented Nov 3, 2023

Yes.
file2

@rokm
Copy link
Member

rokm commented Nov 3, 2023

Then that's your problem. You will either need to move the entry-point script outside of the package, or explicitly add the package directory to the search path using the --paths option, or remove the __init__.py file.

FWIW, your import pattern (from controller import Controller) suggests that the directory is not a package anyway, and that the __init__.py file is superfluous.

@armend26
Copy link
Author

armend26 commented Nov 6, 2023

I did that , but now when I try to create .exe file I'm getting the following error.

PyInstaller.isolated._parent.SubprocessDiedError: Child process died calling import_library() with args=('pyqtgraph.canvas',) and kwargs={}. Its exit code was 3221225725.

@rokm
Copy link
Member

rokm commented Nov 6, 2023

I think we've seen that before - #7991 (comment).

@armend26
Copy link
Author

armend26 commented Nov 6, 2023

Thank you, it worked.

Now it seem's to be another problem. I have seen this , but not working for me.
Do you have any idea why this error appears ?

error2

@rokm
Copy link
Member

rokm commented Nov 6, 2023

That means that platform plugins were either not collected, are corrupted, or are missing a dependency.

Can you attach the full build log (add --clean to your PyInstaller command to force a full rebuild), so we can see what is going on?

@armend26
Copy link
Author

armend26 commented Nov 6, 2023

374 INFO: PyInstaller: 6.1.0
375 INFO: Python: 3.9.13
383 INFO: Platform: Windows-10-10.0.22621-SP0
383 INFO: wrote C:\Users\User\Desktop\gui_code\GUI\app\app\app.spec
387 INFO: Removing temporary files and cleaning cache in C:\Users\User\AppData\Local\pyinstaller
391 INFO: Extending PYTHONPATH with paths
['C:\\Users\\User\\Desktop\\gui_code\\GUI']
pygame 2.1.2 (SDL 2.0.18, Python 3.9.13)
Hello from the pygame community. https://www.pygame.org/contribute.html
769 INFO: checking Analysis
770 INFO: Building Analysis because Analysis-00.toc is non existent
770 INFO: Initializing module dependency graph...
770 INFO: Caching module graph hooks...
785 INFO: Analyzing base_library.zip ...
1714 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
2787 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
3340 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
3526 INFO: Caching module dependency graph...
3624 INFO: Running Analysis Analysis-00.toc
3624 INFO: Looking for Python shared library...
3624 INFO: Using Python shared library: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\python39.dll
3624 INFO: Analyzing C:\Users\User\Desktop\gui_code\GUI\app\app\app.py
3635 INFO: Loading module hook 'hook-PyQt6.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
3770 INFO: Loading module hook 'hook-PyQt5.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
3912 INFO: Loading module hook 'hook-numpy.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\numpy\\_pyinstaller'...
4359 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
4457 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
4586 INFO: Loading module hook 'hook-xml.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
4951 INFO: Loading module hook 'hook-platform.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
5150 INFO: Loading module hook 'hook-sysconfig.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
5964 INFO: Loading module hook 'hook-pandas.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
7139 INFO: Loading module hook 'hook-pytz.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
7352 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
8828 INFO: Processing pre-safe import module hook six.moves from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
9435 INFO: Loading module hook 'hook-scipy.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
9607 INFO: Loading module hook 'hook-pycparser.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
9952 INFO: Processing pre-safe import module hook distutils from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-distutils.py'.
9953 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
10292 INFO: Loading module hook 'hook-distutils.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
10341 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
10416 INFO: Loading module hook 'hook-setuptools.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
12032 INFO: Loading module hook 'hook-importlib_metadata.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
12284 INFO: Loading module hook 'hook-packaging.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
13009 INFO: Loading module hook 'hook-matplotlib.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
13508 INFO: Processing pre-safe import module hook gi from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-gi.py'.
13568 INFO: Loading module hook 'hook-PIL.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
13614 INFO: Loading module hook 'hook-PIL.Image.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
14018 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
14068 INFO: Loading module hook 'hook-xml.dom.domreg.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
14506 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
14974 INFO: Loading module hook 'hook-jinja2.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
17125 INFO: Loading module hook 'hook-matplotlib.backends.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
18078 INFO: Loading module hook 'hook-IPython.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
19523 INFO: Loading module hook 'hook-pygments.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
21622 INFO: Loading module hook 'hook-lib2to3.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
22758 INFO: Loading module hook 'hook-cryptography.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
25133 INFO: Loading module hook 'hook-wcwidth.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
26722 INFO: Loading module hook 'hook-jedi.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
28173 INFO: Loading module hook 'hook-parso.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
29608 INFO: Loading module hook 'hook-sqlite3.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
30839 INFO: Loading module hook 'hook-platformdirs.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
31153 INFO: Loading module hook 'hook-zmq.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
32179 INFO: Loading module hook 'hook-PySide6.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
32362 INFO: Loading module hook 'hook-shiboken6.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
33073 INFO: Loading module hook 'hook-shelve.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
33208 INFO: Loading module hook 'hook-importlib_resources.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
33254 INFO: Loading module hook 'hook-certifi.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
33272 INFO: Loading module hook 'hook-scipy.linalg.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
33572 INFO: Loading module hook 'hook-scipy.sparse.csgraph.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
34557 INFO: Loading module hook 'hook-scipy.spatial.transform.rotation.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
37041 INFO: Loading module hook 'hook-pandas.io.formats.style.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
39209 INFO: Loading module hook 'hook-pandas.plotting.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
39616 INFO: Loading module hook 'hook-botocore.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
41666 INFO: Loading module hook 'hook-openpyxl.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
43799 INFO: Loading module hook 'hook-sqlalchemy.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
45948 INFO: Loading module hook 'hook-charset_normalizer.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
46470 INFO: Loading module hook 'hook-PyQt6.uic.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
46885 INFO: Loading module hook 'hook-pyqtgraph.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
389 WARNING: Failed to collect submodules for 'pyqtgraph.opengl' because importing 'pyqtgraph.opengl' raised: ModuleNotFoundError: No module named 'OpenGL'
47842 INFO: Loading module hook 'hook-PyQt5.uic.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
48104 INFO: Processing pre-find module path hook PyQt5.uic.port_v2 from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-PyQt5.uic.port_v2.py'.
50361 INFO: Loading module hook 'hook-reportlab.lib.utils.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
50530 INFO: Loading module hook 'hook-reportlab.pdfbase._fontdata.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
53037 INFO: Processing module hooks...
53342 WARNING: Hidden import "importlib_resources.trees" not found!
53343 INFO: Loading module hook 'hook-matplotlib.backends.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
53344 INFO: Matplotlib backend selection method: automatic discovery of used backends
53716 INFO: Trying determine the default backend as first importable candidate from the list: ['Qt5Agg', 'Gtk3Agg', 'TkAgg', 'WxAgg']
54172 INFO: Selected matplotlib backends: ['Qt5Agg']
54365 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
56623 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
56834 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
57102 INFO: Loading module hook 'hook-PyQt5.QtSvg.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
57258 INFO: Loading module hook 'hook-PyQt5.QtTest.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
57397 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
57580 INFO: Loading module hook 'hook-PyQt6.QtCore.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
57830 INFO: Loading module hook 'hook-PyQt6.QtGui.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
58026 INFO: Loading module hook 'hook-PyQt6.QtMultimedia.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
58201 INFO: Loading module hook 'hook-PyQt6.QtNetwork.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
58578 INFO: Loading module hook 'hook-PyQt6.QtOpenGLWidgets.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
58742 INFO: Loading module hook 'hook-PyQt6.QtSvg.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
58913 INFO: Loading module hook 'hook-PyQt6.QtTest.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
59092 INFO: Loading module hook 'hook-PyQt6.QtWidgets.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
59276 INFO: Loading module hook 'hook-PySide6.QtCore.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
59554 INFO: Loading module hook 'hook-PySide6.QtGui.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
59839 INFO: Loading module hook 'hook-PySide6.QtNetwork.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
qt.tlsbackend.ossl: Failed to load libssl/libcrypto.
60324 INFO: Loading module hook 'hook-PySide6.QtOpenGLWidgets.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
60540 INFO: Loading module hook 'hook-PySide6.QtPrintSupport.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
60772 INFO: Loading module hook 'hook-PySide6.QtSvg.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
60980 INFO: Loading module hook 'hook-PySide6.QtTest.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
61226 INFO: Loading module hook 'hook-PySide6.QtWidgets.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
61526 INFO: Loading module hook 'hook-scipy.special._ellip_harm_2.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
61528 INFO: Loading module hook 'hook-scipy.special._ufuncs.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
61528 INFO: Loading module hook 'hook-scipy.stats._stats.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
61566 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
62431 INFO: Loading module hook 'hook-setuptools._distutils.command.check.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
62652 INFO: Loading module hook 'hook-sqlalchemy.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
62999 WARNING: Hidden import "pysqlite2" not found!
63026 WARNING: Hidden import "psycopg2" not found!
65292 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
65293 INFO: checking Tree
65294 INFO: Building Tree because Tree-00.toc is non existent
65294 INFO: Building Tree Tree-00.toc
65371 INFO: checking Tree
65371 INFO: Building Tree because Tree-01.toc is non existent
65371 INFO: Building Tree Tree-01.toc
65387 INFO: checking Tree
65388 INFO: Building Tree because Tree-02.toc is non existent
65388 INFO: Building Tree Tree-02.toc
65398 INFO: Loading module hook 'hook-PyQt6.QtOpenGL.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
65635 INFO: Loading module hook 'hook-PySide6.QtOpenGL.py' from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks'...
67227 INFO: Looking for ctypes DLLs
67339 INFO: Analyzing run-time hooks ...
67357 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
67360 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'
67364 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
67368 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_setuptools.py'
67369 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
67377 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_mplconfig.py'
67378 INFO: Processing pre-find module path hook _pyi_rth_utils from 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-_pyi_rth_utils.py'.
67391 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyqt6.py'
67392 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyqt5.py'
67394 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyside6.py'
67396 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\rthooks\\pyi_rth_traitlets.py'
67397 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth__tkinter.py'
67398 INFO: Including run-time hook 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\rthooks\\pyi_rth_pyqtgraph_multiprocess.py'
67812 INFO: Looking for dynamic libraries
C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\PyInstaller\building\build_main.py:194: UserWarning: The numpy.array_api submodule is still experimental. See NEP 47.
  __import__(package)
C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\PyInstaller\isolated\_child.py:96: VisibleDeprecationWarning: zmq.eventloop.minitornado is deprecated in pyzmq 14.0 and will be removed.
    Install tornado itself to use zmq with the tornado IOLoop.

  while run_next_command(read_fh, write_fh):
71022 INFO: Extra DLL search directories (AddDllDirectory): ['C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\numpy\\.libs', 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\scipy\\.libs', 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\matplotlib.libs', 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyQt6\\Qt6\\bin', 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyQt5\\Qt5\\bin', 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\shiboken6', 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\pyzmq.libs', 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\matplotlib.libs']
71022 INFO: Extra DLL search directories (PATH): ['C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PySide6', 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyQt5\\Qt5\\bin', 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\PyQt6\\Qt6\\bin']
77658 WARNING: Library not found: could not resolve 'libmysql.dll', dependency of 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\_mysql_connector.cp39-win_amd64.pyd'.
77919 INFO: Warnings written to C:\Users\User\Desktop\gui_code\GUI\app\app\build\app\warn-app.txt
78339 INFO: Graph cross-reference written to C:\Users\User\Desktop\gui_code\GUI\app\app\build\app\xref-app.html
78607 INFO: checking PYZ
78608 INFO: Building PYZ because PYZ-00.toc is non existent
78608 INFO: Building PYZ (ZlibArchive) C:\Users\User\Desktop\gui_code\GUI\app\app\build\app\PYZ-00.pyz
82960 INFO: Building PYZ (ZlibArchive) C:\Users\User\Desktop\gui_code\GUI\app\app\build\app\PYZ-00.pyz completed successfully.
83078 INFO: checking PKG
83078 INFO: Building PKG because PKG-00.toc is non existent
83078 INFO: Building PKG (CArchive) app.pkg
83122 INFO: Building PKG (CArchive) app.pkg completed successfully.
83124 INFO: Bootloader C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\PyInstaller\bootloader\Windows-64bit-intel\run.exe
83125 INFO: checking EXE
83125 INFO: Building EXE because EXE-00.toc is non existent
83125 INFO: Building EXE from EXE-00.toc
83126 INFO: Copying bootloader EXE to C:\Users\User\Desktop\gui_code\GUI\app\app\build\app\app.exe
83218 INFO: Copying icon to EXE
83320 INFO: Copying 0 resources to EXE
83320 INFO: Embedding manifest in EXE
83442 INFO: Appending PKG archive to EXE
83467 INFO: Fixing EXE headers
84189 INFO: Building EXE from EXE-00.toc completed successfully.
84264 INFO: checking COLLECT
84264 INFO: Building COLLECT because COLLECT-00.toc is non existent
84264 INFO: Building COLLECT COLLECT-00.toc
91798 INFO: Building COLLECT COLLECT-00.toc completed successfully.

@rokm
Copy link
Member

rokm commented Nov 6, 2023

You have PyQt5, PyQt6, and PySide6 available in your environment, and all three of them are being collected (as indicated by hooks being fired), and that usually leads to trouble. Try explicitly excluding the ones that you are not using (e.g., if you are using PyQt6, add --exclude PyQt5 --exclude PySide6 to your PyInstaller command). Or even better, build your program in a virtual environment that has only minimal set of required packages installed.

@armend26
Copy link
Author

armend26 commented Nov 6, 2023

Thank you again, it worked.

Also , I had some problems with loadUi("../ui_files/control_panel/settings.ui", self) , it seemed that pyinstaller doesn't recognize relative path of .ui files.

@rokm
Copy link
Member

rokm commented Nov 6, 2023

Also , I had some problems with loadUi("../ui_files/control_panel/settings.ui", self) , it seemed that pyinstaller doesn't recognize relative path of .ui files.

You should not be using relative paths, as that assumes where the current working directory is (you would encounter the same problem if you ran your original unfrozen script from a different directory). See docs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind:support solution:not enough info Not enough info has been provided to solve or help. Fill out the issue template
Projects
None yet
Development

No branches or pull requests

2 participants