sudo easy_install readline
You'll also need the following lines in ~/.inputrc but you likely have those anwyay.
"\e[1;5D": backward-word
"\e[1;5C": forward-word
my .inputrc has a bunch of junk in it that I can't even
remember why it was added here are some other gems from it:
set completion-ignore-case on
set bell-style visible
set mark-symlinked-directories on
set bind-tty-special-chars off