Python Macport and pydistutils.cfg
I updated my python installation using MacPorts today, and it all seemed to go well. However, running python gave the following error:
Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Searching on the web did not really give an answer, but luckily the MacPort Trac could help me, #9831 was opened over a year ago, but still not solved.
The solution is simple, but time consuming. You’ll have to rebuild your python installation (yes, again…):
mv ~/.pydistutils.cfg ~/.pydistutils.cfg.bak port -f install python24
You may have to do a port -f uninstall python24 along the way, but it should speak for itself.