[PyQt] QMySql driver for PyQt 5.7
Phil Thompson
phil at riverbankcomputing.com
Thu Mar 9 13:38:48 GMT 2017
On 09/03/2017 09:12, Nekhelesh Ramananthan wrote:
> Hi,
>
> I am trying to connect to a MySql server on Ubuntu 16.04 but having
> been
> getting the error,
>
> QSqlDatabase: QMYSQL driver not loaded
> QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
>
> After searching on google, I found that I had to install the package
> libqt5sql5-mysql. Despite installing that package I am still getting
> the
> above error. What am I doing wrong? Ubuntu 16.04 came with Qt 5.5.
> However
> using pip I installed PyQt 5.7 and am using it for my project. My
> project
> is cross-platform. So ideally I would like to use pip to install the
> necessary missing dependency to overcome this issue if possible.
>
> Any help would be highly appreciated.
The PyQt wheels include their own copy of Qt so installing something for
the system Qt isn't going to make any difference. Why not use the latest
wheels?
Phil
More information about the PyQt
mailing list