473,385 Members | 2,044 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,385 software developers and data experts.

Py2exe & (Py)QT4

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 and QtGui.
The error reported is:

Traceback (most recent call last):
File "xmlEdit.py", line 3, in ?
File "PyQt4\QtCore.pyc", line 12, in ?
File "PyQt4\QtCore.pyc", line 10, in __load
ImportError: DLL load failed: Invalid access to memory location.

Line 10 is the import of QtCore.pyd, which is included in the dist
folder. Curiously, this is the same error I get when I input "from
PyQt4 import QtCore, QtGui" into IDLE, so I'm not even sure it's a
Py2exe issue. I'm not quite sure what the error means, only that it
isn't that the file is not found (a Module Not Found error occurs if I
remove QtCore.pyd).

It run just fine from the command line. Can anyone shed some light on
this? QT version is 4.1.3. Python is 2.4.3 and PyQT is 4.0.1.

Jul 20 '06 #1
1 3457
sh************@gmail.com wrote:
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 and QtGui.
The error reported is:

Traceback (most recent call last):
File "xmlEdit.py", line 3, in ?
File "PyQt4\QtCore.pyc", line 12, in ?
File "PyQt4\QtCore.pyc", line 10, in __load
ImportError: DLL load failed: Invalid access to memory location.

Line 10 is the import of QtCore.pyd, which is included in the dist
folder. Curiously, this is the same error I get when I input "from
PyQt4 import QtCore, QtGui" into IDLE, so I'm not even sure it's a
Py2exe issue. I'm not quite sure what the error means, only that it
isn't that the file is not found (a Module Not Found error occurs if I
remove QtCore.pyd).
I don't use Windows, so I can only guess at what the problem is.
Maybe the libraries that QtCore.pyd depends on aren't available,
or they are in a place that the import machinery doesn't know
about.
It run just fine from the command line. Can anyone shed some light on
this? QT version is 4.1.3. Python is 2.4.3 and PyQT is 4.0.1.
I can only suggest looking in the py2exe Wiki:

http://starship.python.net/crew/theller/moin.cgi/Py2Exe

I tried searching for similar report but only found this one

http://groups.google.com/group/comp....317974fd73ea88

that might help you diagnose the problem.

If you want to take this to a PyQt-related mailing list, visit

http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

David

Jul 20 '06 #2

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...
11
by: aljosa | last post by:
i'm looking for image lib which supports common image types (maybe freeimagepy?) and is relatively easy to display image loaded through that lib in PyQt4. any ideas? Aljosa
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...
1
by: luca72 | last post by:
Hello i have python2.5 with sip4.6 installed on a linux machine, i need to install sip4.7 but i get a lot of error like this: sip.h:525: error: expected specifier-qualifier-list before...
0
by: ilochab | last post by:
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...
0
by: Pradnyesh Sawant | last post by:
Hello, I have the following single line in my .py file: from PyQt4 import QtCore, QtGui if i run it from eric, i get the following error: unhandled RuntimeError "the PyQt4.QtCore and qt...
2
by: John | last post by:
I'm trying to install matplotlib and currently getting the below error. I searched the group and google and couldn't find anything similar... Any ideas? Thanks in advance! src/ft2font.cpp:...
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
by: Mathieu Prevot | last post by:
2008/9/24 Jaime Huerta Cepas <jhuerta@cipf.es>: IMHO this is too complex to commit. Macport is a way to do what you want, but packages may not be up to date enough. Maybe the easiest and...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.