How do I set macport python to be default?
S. Günther
h8spawn at googlemail.com
Tue Dec 22 14:28:48 PST 2009
> The correct answer appears to have something to do with the ordering in the PATH variable but this does not seem to work for me:
> (On Snow Leopard - I have installed python from python.org and from Macports)
>
> PATH=/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin
>
> $ whereis python
> /usr/bin/python
>
> $ python
> Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32)
> [GCC 4.0.1 (Apple Inc. build 5493)] on darwin
>
> $ /opt/local/bin/python
> Python 2.6.4 (r264:75706, Dec 21 2009, 20:23:10)
> [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
>
With your path variable set as above the MacPorts python should be found
first. Which makes me suspect that PATH gets modified after set to the
value above.
You should check the output of:
echo $PATH
If that differs from the above setting check your bash startup scripts
whether any of them modify the PATH after your setting takes place.
On my system MacPython modified .bash_profile by prepending it's
location onto the PATH thus overriding my own setting.
regards
Stephan
More information about the macports-users
mailing list