(1)安装readline库: yum install readline-devel.*
(2)重新安装编译Python,并检测:
./configure –prefix=/opt/software/python3.7 –enable-optimizations # python3.6 为指定的安装目录, –prefix 参数可以忽略,选择默认安装路径即可;
make && make install # 编译安装;
ln -s /opt/software/Python3.6/bin/python3 /usr/bin/python # 创建软连接,选择默认安装路径可以忽略;