0

I'm trying to freeze my python application using Fbs (https://build-system.fman.io/) After running to some libs error that I fixed I was able to freeze it without any issue. I can perfectly start the app on my computer. But on an other computer I will get the error: Failed to execute script pyi_rth_qt5plugins

After some research it seems the problem comes from PyInstaller that fbs is using. I have no errors in the terminal when freezing but in the warn-Colorspace_converter.txt file I have the following errors:

missing module named 'PyQt5.QtCore' - imported by PIL.ImageQt (conditional, optional), l:\script\colour\venvcolour\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_qt5plugins.py (optional)
missing module named 'PyQt5.sip' - imported by l:\script\colour\venvcolour\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_qt5plugins.py (optional)
missing module named sip - imported by l:\script\colour\venvcolour\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_qt5plugins.py (optional)

The thing it's that I am using PySide2 so how can I fix that ?

Thread to similar issue that i found but that i didn't understand as they were madded only for pyinstaller or PyQt5. Should i install PyQt5 that may cause issue with fbs to have the two libraries ?

Environment:

  • Windows 10
  • PySide2
  • Python 3.6.8
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
MrLixm
  • 1
  • 3

2 Answers2

0

I'm not an expert or anything.. sharing my experience

You can use the latest Pyinstaller version to freeze the app.. then move the objects to target/<appname> folder. Now use fbs installer to make an installer out of it.

Failed to execute script always comes up if some dependency is missing.

I believe we can also use fbs freeze --debug, which will show the missing dependencies. You can then add them to the hidden imports in .spec file

testuserme
  • 73
  • 1
  • 5
  • Thanks for your answer, i used `freeze --debug` to fix everything and i managed to get it working on my pc like that (but still not on other pc). I'm going to try to use PyInstaller instead of Fbs for freezing. – MrLixm Jun 24 '20 at 16:02
0

So it seems that recreating my virtual environment and downgrading to a lower PySide2 version (5.13.1) fixed the issue.

I still have the same errors in the PyInstaller log (and also have some lib not found in the terminal) but the app can launch perfectly now.

MrLixm
  • 1
  • 3