1

I want to convert onefile mygui file with pyinstaller. If I open the mygui with python3 mygui.py it's openning successfully. But when I convert to onefile with pyinstaller and trying to open ./mygui, I get below errors:

   Traceback (most recent call last):
      File "mygui.py", line 6, in <module>
        from PySide2.QtWidgets import QApplication
    ImportError: /tmp/_MEIlK1RGy/libQt5Core.so.5: version `Qt_5.15' not found (required by /tmp/_MEIlK1RGy/libpyside2.abi3.so.5.15)
    [20822] Failed to execute script 'mygui' due to unhandled exception!

I am using Ubuntu 20.04 how can I solve this problem ? Why the problem appears with executable file ?

I guess problem is because I am using Pyside2 on this project. My other projects (only using pyqt5) successfully converting executable onefile and working correctly. How can I solve this problem I couldnt find any solution.
I convert onefile with this command:

pyinstaller --onefile  --windowed mygui.py

EDIT I updated pyinstaller and this error replaced with below error:

Traceback (most recent call last):
  File "mygui.py", line 3, in <module>
AttributeError: module 'PySide2' has no attribute 'QtPrintSupport'
[16196] Failed to execute script 'mygui' due to unhandled exception!
gogogo
  • 529
  • 1
  • 3
  • 11
  • I suggest for you this answer [link](https://stackoverflow.com/a/40720154/15410147) – amd Jan 12 '22 at 09:09
  • But this link is not related with my question. Because when I convert Pyqt5 gui .py project with pyinstaller they can run. But I use pyside2 in this project so I get below error – gogogo Jan 12 '22 at 11:17
  • And why the librarries searching in tmp file. – gogogo Jan 12 '22 at 11:36
  • @gogogo that's how pyinstaller works: when executed it creates a temporary directory that is used as virtual env in order to run the program. Please [edit] your post and specify the command you used to create the package. – musicamante Jan 12 '22 at 12:39
  • I add pyinstaller command, I just give the this command on my project file – gogogo Jan 12 '22 at 12:57

0 Answers0