Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guidance/instructions for adding files to PyInstaller package? #30

Closed
BobSegrest opened this issue Sep 24, 2022 · 1 comment
Closed

Comments

@BobSegrest
Copy link

BobSegrest commented Sep 24, 2022

With the generous support of others, I managed to get MySQL 8.03 working with PyQt5 on my Windows development system. [see issue #29.] The work as gone well and I am now trying to use PyInstaller to create a deployable package. And of course, I am seeing the dreaded "QMYSQL driver not loaded" error again. Not a great surprise, as I am sure I have to manually include a couple MySql libraries in the package to make things work. This issue is probably related to issue #8 asked and closed a while ago, but no details about the fix were provided.

Cany anyone provide me with instructions or guidance about what needs to be done?

Bob

@BobSegrest
Copy link
Author

Wow, was that easy! Ok, it turns out on Windows 10 all you have to do is copy the contents of the MySQL driver files (all of them, with the sqldriver folder) into the dist/app folder created when you run PyInstaller. After that you can run the app.exe file PyInstaller created in the same folder and you are off and running.

As a point of reference, I followed the deployment instructions in the following tutorial:
https://www.pythonguis.com/tutorials/packaging-pyqt5-pyside2-applications-windows-pyinstaller/

Hope this helps the next person who needs to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant