python 2.7, import wx says "wrong architecture"

Dave Curtis dave at dave-curtis.com
Thu Mar 22 11:24:52 PDT 2012


On Mar 22, 2012, at 10:49 AM, Ned Deily wrote:

> In article <E23B25BB-F603-458D-83FF-D891F168CD4A at dave-curtis.com>,
> Dave Curtis <dave at dave-curtis.com> wrote:
>> arch -i386 idle2.7 
>> 
>> now works!  But it appears to start a 64 bit version of Python in a 32 bit 
>> IDE, because when I
>> 
>> import wx
>> 
>> it gives me the "wrong arch" message.
>> How do I force 32 bit idle2.7 to start 32 bit python? 
>> Or for that matter, shouldn't I be able to get 64 bit idle to start 32 bit 
>> python? That probably makes a little more sense.
> 
> The easiest way is to tell IDLE to run without a subprocess using its -n 
> argument:
> 
> $ arch -i386 idle2.7 -n

Excellent!  Did not know that trick.   
import wx
works in the above environment.

> 
> OTOH, I'm not sure that running wx applications under IDLE (a Tk 
> application) is a good idea.

Yes, that may well turn out to be true.  Tkinter in idle is kind of a loser, too.  But even limping, it has benefits over command line interactive Python.

If I can get spe to work with 2.7 and wx, the idle problem goes away, at least as far as wx goes, but I'm glad I know how to force 32 bit mode in general in idle.

-dave

> 
> -- 
> Ned Deily,
> nad at acm.org
> 
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
> 



More information about the macports-users mailing list