473,379 Members | 1,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 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")
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.

Oct 11 '07 #1
0 2070

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: aljosa | last post by:
i'm trying to convert python (image resizer script using PyQt4) script to exe but support for jpeg and tiff image formats is located in Qt4.1\plugins\imageformats (dll files) and when script is...
1
by: shane.external | last post by:
I'm having trouble using Py2exe with a PyQT-based python project. Or possibly I'm having a problem with PyQT and Py2exe makes it apparent. Whichever it is, I run into trouble with importing QtCore...
2
by: Harshad | last post by:
Hi, I'm writing a program using Python 2.4 and PyQt4. The aim is to implement drag and drop from filesystem and display a list of files dragged on to the listWidget. This function will later...
3
by: Tina I | last post by:
I'm trying to 'convert' my self from Qt3 to Qt4 (it rocks!) and one thing seem strange: With Qt3 I usually did "from qt import *", but this does not seem to work with Qt4. I have to use "from...
25
by: Daniel Jonsson | last post by:
So, I've reached the point where my building pipeline tools actually needs to be used by other people in my company. By this reason I actually need to think about the usability, and I've come to...
2
by: AngelOfDarkness | last post by:
Hi guys, unfortunately I am pretty new to Python and Qt and all that. Well, I managed to successfully program a little stuff for my work (computational neuroscientist... no comment please), using...
5
by: Mel | last post by:
I am currently porting an SQL centered Visual Basic application to run on Linux, Python, and Qt4. Currently I am stumped on changing row colors in the QTableView widget. My test code is based on...
2
by: jiang.haiyun | last post by:
Hi, I am having some serious problems with PyQT4, when i run pyqt script, I always get 'Segmentation fault'. the script is simple: ====================== %less qttest.py from PyQt4 import...
8
by: Carbonimax | last post by:
hello I have a problem with py2exe and QtWebKit : I make a program with a QtWebKit view. If I launch the .py directly, all images (jpg, png) are displayed but if I compile it with py2exe I have...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.