Hi,
Trying to get wxpython working on osx 10.7.4
Demo's work fine when launched from the icon, but if I make a script in
gedit and doubleclick, it just opens in gedit.
Because .py files are considered documents by default, so opening them causes the system to open the associated application and feed the document to it. There are ways around that, but my preference is to just use the command line while in development, and then when it's ready to deploy you can create a real application bundle for it using py2app.
If I run from terminal I get this:
arch -i386 /usr/bin/python wx1.py
Traceback (most recent call last):
File "wx1.py", line 5, in <module>
import wx
File
"/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
line 45, in <module>
from wx._core import *
File
"/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core.py",
line 4, in <module>
import _core_
ImportError:
/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so:
no appropriate 64-bit architecture (see "man python" for running in
32-bit mode)Please help. Sorry for noobness.
Did you try the things shown in the python man page (run "man python") for forcing it to run in 32-bit mode? I thought they were still supposed to work for Apple's Python.
OTOH, you will probably have better luck with the Python from python.org instead of Apple's python in /usr/bin. The python.org version will install in a different location so it won't stomp on Apple's Python, and they also provide a "python-32" command that will force it to run the 32-bit architecture.
Finally, a good alternative would be to install the 2.9.4.0 cocoa port of wxPython instead of the 2.8.12.1 carbon port. The cocoa port is able to include the 64-bit architecture in the binaries and so you don't have to mess with trying to force it to run only in 32-bit.
···
On 8/7/12 5:34 PM, Kim wrote:
--
Robin Dunn
Software Craftsman