I am trying to build an app bundle with py2app on Mac OS X 10.6. The app uses some libraries which are only compiled for 32-bit, so when the app is run there is an ImportError "no appropriate 64-bit architecture". How can I tell py2app to force the app to run in 32-bit mode?
If you want to run only in 32 bit mode, then you don't need the 64 bit architecture. So you can just strip out all the non-i386 architectures from your resulting application bundle using the ditto
utility.
Example:
ditto --rsrc --arch i386 YourApplication.app YourApplicationStripped.app
Your application bundle will be smaller and will run as a 32 bit application for sure, even on 64 bit Intel systems.
Manual: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/ditto.1.html
Or just run in a terminal: man ditto
One way is to use a 32-bit-only Python, such as the 32-bit-only versions downloadable from python.org, with py2app. Another is to set the LSArchitecturePriority
to i386
and possibly ppc
in the generated app bundle's Info.plist. See here for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With