question re: easy_install and macports
Hi, I have a quick question regarding easy_install and MacPorts. I tried easy_installing nose while using MacPorts (Python 2.6.7 / py26-distribute @0.6.24_0 / MacPorts version 2.0.3) --
sudo python -m easy_install 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 So nosetests is not automatically in the path. Was this a problem with MacPorts, easy_install, or nose? Whose responsibility was it to create the alias? Thanks a lot, --Chris
On Thu, Oct 27, 2011 at 8:22 AM, Chris Jerdonek
Hi, I have a quick question regarding easy_install and MacPorts. I tried easy_installing nose while using MacPorts (Python 2.6.7 / py26-distribute @0.6.24_0 / MacPorts version 2.0.3) --
sudo python -m easy_install 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
So nosetests is not automatically in the path. Was this a problem with MacPorts, easy_install, or nose? Whose responsibility was it to create the alias?
easy_install doesn't create aliases or symlinks for such things; it just installs where it's told to by the local distutils configuration. You can use the command line or standard distutils configuration to tell it where you want scripts installed.
In article
Hi, I have a quick question regarding easy_install and MacPorts. I tried easy_installing nose while using MacPorts (Python 2.6.7 / py26-distribute @0.6.24_0 / MacPorts version 2.0.3) --
sudo python -m easy_install 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
So nosetests is not automatically in the path. Was this a problem with MacPorts, easy_install, or nose? Whose responsibility was it to create the alias?
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 to the appropriate shell initialization profile, like .bash_profile. -- Ned Deily, nad@acm.org
On Thu, Oct 27, 2011 at 1:23 PM, Ned Deily
In article
, Chris Jerdonek 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? Thanks again, --Chris
In article
On Thu, Oct 27, 2011 at 1:23 PM, Ned Deily
wrote: In article
, Chris Jerdonek 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@acm.org
On Thu, Oct 27, 2011 at 11:54 PM, Ned Deily
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 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.
Thanks. Adding MacPorts "Current" framework bin to my path is the solution I was looking for. --Chris
participants (3)
-
Chris Jerdonek
-
Ned Deily
-
PJ Eby