I had an issue getting phpsh to work on my mac - I kept getting the following error:

Traceback (most recent call last): File “./phpsh”, line 20, in import readline

OK, seems easy enough. So I compiled python with readline support.

./configure –prefix=/usr/local/python –enable-readline

I change the PATH variable in my .bash_profile to point to the /usr/local/python directory first, and source’d it to get the new PATH settings. Still get the same error.

Usually at this point I’d like to tell you what was wrong, and how I fixed it. But you know what - I never figured it out. I just installed the python binary from python.org. And it works.

Sometimes it’s just not worth fighting the battle.