471,310 Members | 1,057 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

Py2exe with PyQt4 and sqlite

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")
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.


Oct 11 '07 #1
0 1945

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by aljosa | last post: by
1 post views Thread by shane.external | last post: by
2 posts views Thread by Harshad | last post: by
3 posts views Thread by Tina I | last post: by
25 posts views Thread by Daniel Jonsson | last post: by
5 posts views Thread by Mel | last post: by
2 posts views Thread by jiang.haiyun | last post: by
8 posts views Thread by Carbonimax | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.