解决办法:

yum -y install readline-devel

然后重新编译安装python

问题解决~