+ 3

Packaging python files to .exe

I have imported pymysql, while converting .py files to exe through pyintaller, how can i make pymysql work in a machine/PC that doesn't have MySql installed?

25th Jan 2020, 5:03 AM
Emmanuel Chweya
Emmanuel Chweya - avatar
6 Answers
+ 5
Taste ~ swim ~ I am thinking if you try open a database but it does not exist then it will be an exception. Right ?
25th Jan 2020, 11:56 AM
Pedro H.J
Pedro H.J - avatar
+ 3
I think It's an exception. To use exception handling in Python, you first need to have a catch-all except clause. The words "try" and "except" are Python keywords and are used to catch exceptions.
25th Jan 2020, 5:11 AM
Pedro H.J
Pedro H.J - avatar
+ 2
you can do as Pedro H.J said. depend on your program consumer installing mysql can be a bother, most of the end-user only want oneclick to install and run. thats why many application have those things their program may need bundled with the installer, and i'm not sure if oracle allow mysql to be bundled with your program. best way to do this is either use them from hosting services across the web. or use serverless database like sqlite
25th Jan 2020, 5:44 AM
Taste
Taste - avatar
+ 1
Thanks alot friend
29th Jan 2020, 5:46 AM
Emmanuel Chweya
Emmanuel Chweya - avatar