QMYSQL problem

J Barchan jnbarchan at gmail.com
Mon Oct 26 07:36:30 GMT 2020

On Sun, 25 Oct 2020 at 14:49, Angelo Ballabio <angeloballabio at gmail.com>

> hi
> When I create a virtual environment and loaded PyQt5 into it, I realized
> that I cannot access MySQL database through  QSqlDatabase.addDatabase(self
> .DBtype), checking I saw that the libsqlmysql.so driver is not present in
> the sqldrivers directory along with the others. I tried to search the
> internet for the file in question, and nothing on the qt.io website, and
> also on mysql.com I can't find the file. if i use the one installed in my
> ubuntu 20.10 distribution it tells me that it is not compatible with the
> others. In a standard environment its does. Anyone have a solution to
> suggest?
> Angelo

My understanding: as of the changes made in Oracle licensing, Qt can no
longer distribute MySQL driver ready-built.  You have to build it for
yourself now.

In the release distro of Ubuntu 20.04 there is a ready-built SQL driver.
If you use that then no need to build.

But if you take a later Qt you have to do the build.  I don't know exactly
how this relates to your version of PyQt5 or your virtual environment
though.  But I'm assuming there is a relationship?

Hope this helps, I am interested to see the correct answer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20201026/5955c881/attachment.htm>

More information about the PyQt mailing list