Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It appears that C extension modules included with the wxPython 2.7 dmg <a href="http://www.wxpython.org/download.php" rel="noreferrer">here</a> are 32-bit only.</p> <pre><code>$ cd /usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx $ file *.so _animate.so: Mach-O universal binary with 2 architectures _animate.so (for architecture ppc): Mach-O bundle ppc _animate.so (for architecture i386): Mach-O bundle i386 _aui.so: Mach-O universal binary with 2 architectures _aui.so (for architecture ppc): Mach-O bundle ppc _aui.so (for architecture i386): Mach-O bundle i386 ... </code></pre> <p>Unfortunately, <code>platform.architecture()</code> does not give an accurate indication of which arch an OS X multiple architecture Python is running in. For example, using the 3-arch python.org installer for Python 2.7, <code>platform.architecture()</code> always reports 64-bit even when running in 32-bit mode:</p> <pre><code>$ cd /Library/Frameworks/Python.framework/Versions/2.7 $ file python2.7 python2.7: Mach-O universal binary with 3 architectures python2.7 (for architecture i386): Mach-O executable i386 python2.7 (for architecture ppc7400): Mach-O executable ppc python2.7 (for architecture x86_64): Mach-O 64-bit executable x86_64 $ arch -x86_64 ./python2.7 -c 'import platform, sys; print "{0}, {1:x}".format(platform.architecture()[0], sys.maxint)' 64bit, 7fffffffffffffff $ arch -i386 ./python2.7 -c 'import platform, sys; print "{0}, {1:x}".format(platform.architecture()[0], sys.maxint)' 64bit, 7fffffff $ arch -ppc ./python2.7 -c 'import platform, sys; print "{0}, {1:x}".format(platform.architecture()[0], sys.maxint)' 64bit, 7fffffff </code></pre> <p>The reliable way is to examine <code>sys.maxint</code> for Python 2 or <code>sys.maxsize</code> for Python 3.</p> <p>You don't indicate in your question how you invoke Python. Is it via a shebang line in a script file? If so, you may not be running the Python you think you are. Also, you don't indicate which Python 2.7 you have installed. For instance, there are currently two installers for Python 2.7 from python.org: one supports both 32- and 64-bit execution, the other is 32-bit only. Try the following:</p> <pre><code>$ file $(python2.7 -c 'import sys;print(sys.executable)') /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: Mach-O universal binary with 3 architectures /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python (for architecture i386): Mach-O executable i386 /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python (for architecture ppc7400): Mach-O executable ppc /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python (for architecture x86_64): Mach-O 64-bit executable x86_64 </code></pre> <p>So: if you have a multi-arch version of Python, you'll need to force it to run in 32-bit mode to make use of the pre-compiled wxPython.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload