Py2exe, PyQt4 and Postgre Driver (QPSQL)
Posted
by Marshall
on Stack Overflow
See other posts from Stack Overflow
or by Marshall
Published on 2010-05-21T19:55:56Z
Indexed on
2010/05/21
20:00 UTC
Read the original article
Hit count: 540
Hi, I`m trying to freeze my application using Py2exe.
My app uses PyQt4 and it apparently works fine with py2exe. But once I`ve uninstalled PyQt, it shows the following error:
QSqlDatabase: QPSQL driver not loaded QSqlDatabase: available driver: QPSQL7 QPSQL
Which doesn't make sense at all. If PyQt4 is still installed, it works just fine.
This is my py2exe parameters:
data_files = [
('sqldrivers', [
'C:\Python26\Lib\site-packages\PyQt4\plugins\sqldrivers\qsqlpsql4.dll'
])
]
setup(console=["delivery.py"], options={"py2exe" : {"includes" : ["sip", "PyQt4.QtSql", "PyQt4.QtWebKit", "PyQt4.QtNetwork"]}}, data_files=data_files)
© Stack Overflow or respective owner