Ok, I recently installed Python27 with macports, but something happened and I created  a mess. So I uninstalled it with sudo port uninstall --follow-dependents python27. Then I reinstalled it, did sudo port select --set python python27. All successful up to this point. But now I go to run python, and I get an error:
ImportError: No module named site
Any ideas? It's been driving me crazy for the past hour. 
Mac OS X Lion / Python 2.7 / MacPorts
The proper solution for this problem was to make it sure your PYTHONHOME environment variable is set correctly. You will receive this error if PYTHONHOME is pointing to invalid location or to another Python installation you are trying to run.
ImportError: No module named site - Python27 - MacPorts