Error installing gnureadline via pip
In addition to the above. The libffi
package sorted it out for me.
sudo apt-get install libncurses5-dev libffi-dev
sudo apt-get install libncurses5-dev
Reference: Ipython no readline available and pip install readline error