<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>Py2app working with PyQt, PyOpenGL applications?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hello,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I am trying to use py2app to build an application bundle distribution on Mac OS X. I got some problems, I wonder if any one has similar experiences or any ideas for these?</FONT></P>

<P><FONT SIZE=2 FACE="Arial">My Mac OS X is 10.2.8. I built py2app from source, since the py2app-0.1.5 installation package needs 10.3 installer. My software uses PyQt, PyOpenGL packages. Same as py2exe, py2app can't find the &quot;sip&quot; module, which is used by PyQt,&nbsp; so I add the option: &quot;--includes sip&quot;, this works fine, but the problem is when I run the application, I got an error:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">IOError: [Errno20] Not a directory: '&#8230;./Contents/Resources/Python/site-packages.zip/OpenGL/version'.&nbsp; </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I tried to add the file 'version' from OpenGL directory to site-packages.zip and extract the zip file into a directory called site-packages.zip, the above error disappeared, but I got an new error: </FONT></P>

<P><FONT SIZE=2 FACE="Arial">QPaintDevice: Must construct a Qapplication before a QPaintDevice.&nbsp; My application works fine and doesn't have such errors if I just start it from a shell window like: pythonw &#8230;./myapp.py.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">I also tried&nbsp; &quot;--excludes OpenGL&quot; module and then manually copy the OpenGL directory&nbsp; from Python.frameworks to &quot;site-pakcages.zip&quot; and &quot;lib-dynload&quot; directories, the trick that I used for py2exe on Windows, but it seems this is not working here: &quot; Fatal Python error: Interpreter not initialized (Version mismatch?) &quot;</FONT></P>

<P><FONT SIZE=2 FACE="Arial">&nbsp;</FONT>

<BR><FONT SIZE=2 FACE="Arial">Please share your experience or ideas if you may have some for those problems. Thanks a lot.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">huaicai</FONT>
</P>

</BODY>
</HTML>