简介:
ipython 是一个 python 的交互式 shell,比默认的python shell 好用得多,支持变量自动补全,自动缩进,支持 bash shell 命令,内置了许多很有用的功能和函数
1、CentOS6.5 安装Python 的依赖包
yum groupinstall "Development tools" yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
2、下载Python3.5的源码包并编译
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
3、在运行Python之前需要配置库:
echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf ldconfig
4、运行演示:
python3 --version Python 3.5.0
tar xf ipython-0.12.1.tar.gz 编译(如果不可执行可忽略,自己包目录下如果有build的话执行) cd ipython-0.12.1/ /usr/local/python3/bin/python35 setup.py build 安装 /usr/local/python27/bin/python3 setup.py install 链接到/usr/bin ln -sv /usr/local/python27/bin/python3 /usr/bin/python3 ln -sv /usr/local/python27/bin/ipython /usr/bin/
6、运行演示:
#ipython //直接运行即可