3

I'm making a mac app with wxpython, and when I bundle it with py2app, I get the "no appropriate 64-bit architecture" message. This can be fixed by checking "open in 32-bit mode" in the Get Info panel, but this isn't very convenient for people using the app. Is there a line I can add to my script to make it run in 32-bit, even though Python's default is 64-bit?

tkbx
  • 15,602
  • 32
  • 87
  • 122
  • Possible duplicate of: http://stackoverflow.com/questions/7472301/how-to-force-py2app-to-run-app-in-32-bit-mode – jathanism Oct 22 '12 at 00:31

2 Answers2

4

You can create a 32-bit-only version of the app using ditto:

ditto --rsrc --arch i386 dist/MyApp.app dist/MyApp-32.app

MyApp-32.app will be an application bundle that only starts in 32-bit mode. As a nice bonus, ditto strips out the 64-bit architecture entirely, leaving you with a smaller application bundle (around half the size in my testing).

nneonneo
  • 171,345
  • 36
  • 312
  • 383
1
$ export VERSIONER_PYTHON_PREFER_32_BIT=yes

when you install your program. This will start python with 32 bit.

This has to be run inside a bash terminal with optional super user privileges.

start_your_program.sh

export VERSIONER_PYTHON_PREFER_32_BIT=yes
./main.py
Aniket Inge
  • 25,375
  • 5
  • 50
  • 78