Py2exe with PyQt4 and sqlite

I

ilochab

I wrote an application that uses PyQt4 to access a sqlite DB.

Now I'm trying to convert it using py2exe and I found some problems.
The last one, that I'm not able to avoid, is that when I launch the
application's binary on a PC (that contains only a Python 2.5
installation and no QT4) I get an error trying to open the DB withi
this code:

db = QtSql.QSqlDatabase.addDatabase("QSQLITE")
db.setDatabaseName(defines.DB_FILE)
if not db.open():
# displays:
Driver not loaded.

I made many attempts changing options in my setup file but none of
them successfull.
The last one uses this options:

options={"py2exe": {"includes":["sip", 'PyQt4.QtSql' ],
"packages": ["sqlite3",]}}

but I verified that neither QtSql, neither sqlite3 are usefull to
avoid the error.

My development configuration is
Python 2.5
Qt4 4.2.2
PyQt 4.1.1

Any suggestion to solve this problem?

Thanks in advance.

Ciao.
Licia.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top