[Pythonmac-SIG] py2app plugin problem: "Error loading code"

Dethe Elza delza at livingcode.org
Wed Dec 13 01:28:22 CET 2006

On 10-Dec-06, at 1:37 PM, Ronald Oussoren wrote:

> The problem is that py2app/bundletemplate/prebuild/main in the  
> py2app distribution is an intel-only binary (at least in the  
> current trunk) instead of a universal binary.
> Removing the file and running 'setup.py' in the bundletemplate  
> directory should rebuild it with the proper architecture for your  
> machine.

Ytrewq1 and I were working on this and he(?) came up with a solution  
that seems to work for universal binaries:

On 10-Nov-2006 ytrewq1 wrote:

> I think I got something working.
> The steps I followed were:
> 1. Move the prebuilt main binary out of the way
> (py2app/bundletmplate/prebuilt/main)
> 2. Modify py2app/bundletemplate/setup.py so that it builds  
> universal binaries
> In step 2, I changed the CFLAGS line to be:
> CFLAGS = '-Os -Wall -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch
> i386 -arch ppc'
> That seemed to do it for me.

This worked for me, but I had other issues, which turned out to be  
that when I'd installed Stackless it had taken over as my main  
python, and since it mostly worked, it took me awhile to see the  

So far using the above recipe is working well for me.


When laws are outlawed, only outlaws will have laws.

More information about the Pythonmac-SIG mailing list