python3 交互状态下无法回退解决方法(Centos 6.7)
yum install -y readline-devel
(Centos 6.6)环境利用6.7下载的rpm包安装
yum install -y ncurses-devel
ncurses-devel-5.7-4.20090207.el6.x86_64.rpm readline-devel-6.0-4.el6.x86_64.rpm
重新编译安装python3
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar xf Python-3.5.0.tgz
cd Python-3.5.0
./configure --prefix=/usr/local --enable-shared
make
make install
ln –s /usr/local/bin/python3 /usr/bin/python3
在运行Python之前需要配置库:
echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf
ldconfig
可以设置别名:alias py=python3方便使用
OK