I use MacPorts to manage certain *nix packages on my Mac. One such Mac has multiple Python versions installed.

When I switch between Python versions, I use a command like:

port select --set python python27-apple

to set the default python to the Python 2.7 that my Mac shipped with from Apple, as described here.

However, MacPort's select command doesn't change any of the utilities that use python, such as easy_install.

This means that regardless of which Python is active, the supporting utilities are always the system default ones:

bash-3.2$ which python
bash-3.2$ port select --show python
The currently selected version for 'python' is 'python27'.
bash-3.2$ which easy_install
bash-3.2$ ls /opt/local/bin/easy_install-*
/opt/local/bin/easy_install-2.7 /opt/local/bin/easy_install-3.4

Notice that installing a Python version with MacPorts brings along its easy_install command, but switching to that python using port select --set python27 does not also set /opt/local/bin/easy_install-2.7.

This leads to confusing errors where the wrong version of Python was used to install packages.

Thus, my question:

How can I instruct MacPorts to make appropriate symlinks for Python's additional utilities, not just the single python command?

  • Did you forward your acurate analysis to the macports project: guide.macports.org/#project.tickets ? – daniel Azuelos Jan 14 '15 at 13:06
  • Not yet, I just figured I had to be missing something. But if I'm not, I will file a ticket. Thanks for the sanity check in any event. :) – Meitar Jan 15 '15 at 14:48
  • Okay, I added Ticket:46568 to their bug tracker. – Meitar Jan 15 '15 at 15:19

You must log in to answer this question.

Browse other questions tagged .