Reputation: 51
i'm creating a calculato in python. I'm trying to convert the final version to executable. Transfer with pyinstaller is going okay. It creates an .exe file, but when i start .exe file, it shows this error:
In file "calculator.py" line 10 is:
from PySide2 import *
When i turn it on as a python file, it works properly. I can't find what is causing this error.
Upvotes: 1
Views: 499
Reputation: 51
As suggested by comments, problem was solved by cutting which parts of library i was using and only adding those to the code. So final import looked like this:
from PySide2 import QtGui, QtWidget
Upvotes: 1
Reputation: 346
Have you tried to run pyinstaller in a clean enviroment with only the necessary libaries. Pyinstaller tend to use installed libaries in the enviroment this makes the files larger and slower to run and can give errors. It has solved most of my pyinstaller issues. I hope this helps.
Upvotes: 1