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.