简体   繁体   中英

Python, PyQt5, and MySql on Windows 10, is there a solution?

I have Python v3.9, PyQt5 v5.15, and MySql 8.1 installed on a Windows 10 64-Bit system and like many (many) others have been struggling with the well documented "QMYSQL driver not loaded" problem. Over the past week I have read more than 30 articles on how to fix this and I'm just not getting there. The MySql Python connector works fine, my angst is only with the missing QMYSQL functionality.

Has anyone actually gotten this to work?

Is there a specific combination of versions that will allow these 3 tools to work together on Windows?


My Windows PATH is currently:

PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\Go\bin;C:\Users\bobse\AppData\Local\Programs\Python\Python39\Scripts\;c:\Users\bobse\AppData\Local\Programs\Python\Python39\;C:\Users\bobse\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\bobse\AppData\Local\Programs\Python\Python39\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\bobse\AppData\Local\Microsoft\WindowsApps;C:\Users\bobse\AppData\Roaming\npm;C:\Users\bobse\AppData\Local\GitHubDesktop\bin;C:\Users\bobse\go\bin;

Part of my problem is that I don't understand exactly what files can't be found and where the tools are looking for them. What should I be looking for and where should I be looking for it?

YES! there is an answer! It can be done!

It took me 60 hours of my time and 7 days, but I have PyQt5, QtDesigner, Python 3.10, MySQL 8.0 all working and talking to each other on a Windows 10 system.

Be warned, once I found someone who made it work and from this discovered what I had missed, I had to build a new Windows 10 system and load all the pieces in the right order to get it working.

The major piece is a set of Qt libraries for MySQL and MariaDB maintained on "thecodemonkey86" Github site. If you want the details, please read through the following thread...

qt_mysql_driver issue 29

https://github.com/thecodemonkey86/qt_mysql_driver/issues/29

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM