I wrote an application that uses PyQt4 to access a sqlite DB.<br><br>Now I'm trying to convert it using py2exe and I found some problems.<br>The last one, that I'm not able to avoid, is that when I launch the<br>application's binary on a PC (that contains only a Python
2.5<br>installation and no QT4) I get an error trying to open the DB with<br>this code:<br><br>db = QtSql.QSqlDatabase.addDatabase("QSQLITE")<br>db.setDatabaseName(defines.DB_FILE)<br>if not db.open():<br> # displays:
<br> Driver not loaded.<br><br>I made many attempts changing options in my setup file but none of<br>them successfull.<br>The last one uses this options:<br><br> options={"py2exe": {"includes":["sip", '
PyQt4.QtSql' ],<br> "packages": ["sqlite3",]}}<br><br>but I verified that neither QtSql, neither sqlite3 are usefull to<br>avoid the error.<br><br>I also copied manually all the Qt/4.2.2/plugins/sqldrivers .dll files to my distribution directory but anything changed.
<br><br>My development configuration is<br>Python 2.5<br>Qt4 4.2.2<br>PyQt 4.1.1<br><br>Any suggestion to solve this problem?<br><br>Thanks in advance.<br><br>Ciao.<br>Licia.<br><br>