DEV Community

Discussion on: How to convert .py to .exe? Step by step guide.

Collapse
 
eshleron profile image
Eshleron • Edited

Hi! To use .exe an end user doesn't need anything. Once it's .exe and not .py format your script should be usable without any additional software. Check for correct paths if you're opening smt inside your program.

But make sure (if you work with SQL DB) that it's packed with evething it needs. I haven't tried to work with DB and PyInstaller so I dont know how it will be able to pack it. I guess to PyInstaller it's just the same library as any other.

Collapse
 
jromano1 profile image
JPR

Thank you for the reply!

It seems that that's not always the case, and the converted .exe doesn't always contain the same stuff.

For example, and I apologize for not having the code and error messages anymore... I had a script (in PyCharm) that pulled a 2 values from a SQL table, then just subtracted them and printed out the difference (up to the thenth position). It worked fine, but once I converted it, I received an error that the "Decimal" module/library could not be found. I never called "Decimal", but one of my colleagues said it was part of the standard python installation. So we assumed the issue, then, was that the "Decimal" library/module/package was excluded from the final build.

I've since been unable to resolve this problem and built the app using something else, but I'd love to try again sometime.

Some comments have been hidden by the post's author - find out more