[Py2exe-users] PyQt problem
by Shan other posts by this author
Jul 6 2004 9:53AM messages near this date
Re: [Py2exe-users] py2exe 0.5.2 released
|
Re: [Py2exe-users] sys.modules hijinx breaks windows executables
Hi,
I have been trying to package a trivial PyQt application using py2exe, but I
don't seem to succeed.
The details are below. Would be grateful for any pointers on how I may
accomplish this.
Regards,
Shan
setup.py contains:
from distutils.core import setup
import py2exe
setup(windows=["hello1.py"])
hello1.py contains:
import sys
from qt import *
app=QApplication(sys.argv)
button=QPushButton("Hello World", None)
app.setMainWidget(button)
button.show()
app.exec_loop()
I run "python setup.py py2exe" and get this:
running py2exe
creating C:\trial\build
creating C:\trial\build\bdist.win32
creating C:\trial\build\bdist.win32\winexe
creating C:\trial\build\bdist.win32\winexe\collect
creating C:\trial\build\bdist.win32\winexe\temp
creating C:\trial\dist
*** searching for required modules ***
*** parsing results ***
creating python loader for extension '_sre'
creating python loader for extension 'qt'
*** finding dlls needed ***
*** create binaries ***
*** byte compile python files ***
byte-compiling F:\Python23\lib\copy_reg.py to copy_reg.pyc
byte-compiling F:\Python23\lib\sre_compile.py to sre_compile.pyc
byte-compiling C:\trial\build\bdist.win32\winexe\temp\_sre.py to _sre.pyc
byte-compiling F:\Python23\lib\macpath.py to macpath.pyc
byte-compiling F:\Python23\lib\popen2.py to popen2.pyc
byte-compiling F:\Python23\lib\atexit.py to atexit.pyc
byte-compiling F:\Python23\lib\os2emxpath.py to os2emxpath.pyc
byte-compiling F:\Python23\lib\sre_constants.py to sre_constants.pyc
byte-compiling F:\Python23\lib\re.py to re.pyc
byte-compiling F:\Python23\lib\ntpath.py to ntpath.pyc
byte-compiling F:\Python23\lib\stat.py to stat.pyc
byte-compiling F:\Python23\lib\string.py to string.pyc
byte-compiling F:\Python23\lib\warnings.py to warnings.pyc
byte-compiling F:\Python23\lib\UserDict.py to UserDict.pyc
byte-compiling F:\Python23\lib\repr.py to repr.pyc
byte-compiling F:\Python23\lib\copy.py to copy.pyc
byte-compiling F:\Python23\lib\types.py to types.pyc
byte-compiling F:\Python23\lib\posixpath.py to posixpath.pyc
byte-compiling C:\trial\build\bdist.win32\winexe\temp\qt.py to qt.pyc
byte-compiling F:\Python23\lib\sre.py to sre.pyc
byte-compiling F:\Python23\lib\linecache.py to linecache.pyc
byte-compiling F:\Python23\lib\sre_parse.py to sre_parse.pyc
byte-compiling F:\Python23\lib\os.py to os.pyc
*** copy extensions ***
copying F:\Python23\DLLs\_sre.pyd -> C:\trial\dist
copying F:\Python23\lib\site-packages\qt.pyd -> C:\trial\dist
*** copy dlls ***
copying C:\WINNT\system32\python23.dll -> C:\trial\dist
copying F:\Python23\w9xpopen.exe -> C:\trial\dist
copying F:\Qt\3.3.1\bin\qt-mt331.dll -> C:\trial\dist
copying F:\Python23\lib\site-packages\py2exe\run_w.exe ->
C:\trial\dist\hello1.exe
Now the dist directory contains the following files:
_sre.pyd
hello1.exe
library.zip
python23.dll
qt-mt331.dll
qt.pyd
w9xpopen.exe
Now I enter the dist directory and type "hello1.exe". Nothing happens. Then,
a small dialog pops up saying "See the logfile C:\trial\dist\hello1.exe.log
for details"
hello1.exe.log contains:
Traceback (most recent call last):
File "hello1.py", line 5, in ?
File "qt.pyc", line 9, in ?
File "qt.pyc", line 7, in __load
ImportError: No module named sip
I then tried to copy
sip.pyd
sipconfig.py
sipconfig.pyc
from the site-packages directory to the dist directory and ran "hello1.exe"
again. I got the same pop-up, and the hello1.exe.log file contained the same
message.
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Py2exe-users mailing list
Py2exe-users@[...].net
https://lists.sourceforge.net/lists/listinfo/py2exe-users
|