Py2exe, PyQt4 and Postgre Driver (QPSQL)
- by Marshall
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)