python 2.7, import wx says "wrong architecture"
Ned Deily
nad at acm.org
Thu Mar 22 15:24:24 PDT 2012
In article <EF2803A3-180A-47F1-A4AD-9E7AD65F8585 at macports.org>,
Ryan Schmidt <ryandesign at macports.org> wrote:
> On Mar 22, 2012, at 10:51, Dave Curtis wrote:
>
> > Idle is an IDE, done using Python's TK interface components. It is the
> > default IDE for Python that is more-or-less guaranteed to be present with
> > Python.
> >
> > I'm not familiar with the guts of it, but I presume it is picking up a
> > Python through whatever pointer mechanism python-select uses -- again I'm
> > not expert in the mechanics of that either. I'll have to go research idle
> > configuration settings.
>
> Hopefully idle does *not* pick up python via the version that the user
> selected; if it did, that would be a bug in the port that we would want to
> fix. idle should use the specific version of python that it is designed to
> work with.
idle is just a small shebang script copied from the version-specific
shebang script, i.e. idle2.7, idle3.2, et al. The appropriate specific
interpreter shebang path is built into the version-specific idle script
and "port select python" symlinks "idle" to the selected "idlem.n"
script. So it appears to be doing the right thing. One could quibble
about creating separate "python" and "python3" select groups, including
separate "idle" and "idle3" symlinks and including a "python2" symlink,
as recommended in the recent PEP 394
(http://www.python.org/dev/peps/pep-0394/). The issue here, though, is
simply that, although universal builds of Python 2.7+ and 3.2+ support
arch selection with /usr/bin/arch, Python does not ensure that any
subprocesses with a Python interpreter that are launched are forced to
be the same execution arch as the main interpreter. One such case is
here when IDLE launches a subprocess; it just defaults to the
system-preferred arch (usually x86_64 on 10.6+). There may be other
cases of this. I have a note to myself to track them down and possibly
fix it upstream. But I don't think it's a major issue.
--
Ned Deily,
nad at acm.org
More information about the macports-users
mailing list