[Distutils] question re: easy_install and macports

Ned Deily nad at acm.org
Fri Oct 28 08:54:51 CEST 2011


In article 
<CAOTb1wdpG748xRui0CS5jP-LUgr_B1apggGy_FJMr+ZdhR0xUQ at mail.gmail.com>,
 Chris Jerdonek <chris.jerdonek at gmail.com> wrote:

> On Thu, Oct 27, 2011 at 1:23 PM, Ned Deily <nad at acm.org> wrote:
> > In article
> > <CAOTb1wf9JpwBTxqwmF8GHMC1v3vmHmkDeO7REjeOysnxy_p7-g at mail.gmail.com>,
> >  Chris Jerdonek <chris.jerdonek at gmail.com> wrote:
> >> Hi, I have a quick question regarding easy_install and MacPorts.  I
> >> tried easy_installing nose
> 
> >> This worked, except it installed the nosetests script into--
> >>
> >> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin
> >>
> >> but did not create an alias in--
> >>
> >> /opt/local/bin
> >>
> > For Mac OS X Python framework builds, the easiest general solution is to
> > add the framework bin directory to your shell PATH.  The python.org
> > installers do that by default.  For a Macports Python, you can add
> > something like:
> >
> > export
> > PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin:$PAT
> > H
> 
> Thanks for the reply, Ned.  Will this approach cause problems, though,
> when switching to a different Python using "port select python" --
> what's the best way to handle that issue?  Also, is there any reason
> why "port select python" wasn't written to swap out and add the
> appropriate framework bin to your PATH, say, immediately after
> /opt/local/bin?

Dunno.  You could file an issue with the MacPorts project.  It seems 
like they've added explicit links to /opt/local/bin for most of the 
ports that include Python scripts.  But that doesn't help if you are 
using easy_install or pip to install other Python packages.  For 
supporting switching between MacPorts Python versions, you can 
substitute "Current" for "2.6" in the above path; I believe "port select 
python" updates the "Current" link to point to the selected version.

-- 
 Ned Deily,
 nad at acm.org



More information about the Distutils-SIG mailing list