In article <caotb1wdpg748xrui0cs5jp-lugr_b1apgggy_fjmr+zdhr0...@mail.gmail.com>, Chris Jerdonek <[email protected]> wrote:
> On Thu, Oct 27, 2011 at 1:23 PM, Ned Deily <[email protected]> wrote: > > In article > > <caotb1wf9jpwbtxqwmf8ghmc1v3vmhmkdeo7rejeoysnxy_p...@mail.gmail.com>, > > Chris Jerdonek <[email protected]> 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, [email protected] _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
