5yutan5 / PyQtDarkTheme

A flat dark theme for PySide and PyQt.
https://pyqtdarktheme.readthedocs.io
MIT License
545 stars 84 forks source link

PyInstaller executable doesn't work if I include qdarktheme #241

Open pradosh-arduino opened 1 year ago

pradosh-arduino commented 1 year ago

Hello, so I'm encountering a problem, I have an project that uses qdarktheme and if I run py main.py the theme works and it's nice but when I build to exe using PyInstaller and run the executable, it fails with this message:

File "main.py", line 12, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
  File "qdarktheme\__init__.py", line 45, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
  File "qdarktheme\_main.py", line 9, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
  File "qdarktheme\_style_loader.py", line 9, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
  File "qdarktheme\_template\filter.py", line 10, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
  File "qdarktheme\qtpy\__init__.py", line 3, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
  File "qdarktheme\qtpy\qt_version.py", line 8, in <module>
ImportError: DLL load failed while importing QtCore: The specified module could not be found.

also note that if I build the exe without qdarktheme the exe works, so I really wanna use your theme, so I hope I get a quick response. thank you

sw-dev-code commented 1 year ago

@pradosh-arduino I had also a problem running the exe generated by the pyinstaller. The solution in my case was update of pyinstaller to latest version.