ipython是python的增强环境,可以语法着色,自动补全,功能 强大
先安装基本环境包
yum groupinstall "Development Tools" yum install zlib zlib-devel readline-devel sqlite-devel bzip2-devel openssl-devel gdbm-devel libdbi-devel ncurses-libs
上传python安装包 Python-2.7.12.tgz
tar xf Python-2.7.12.tgz ./configure --prefix=/usr/local/python2.7.12 make make install ln -s /usr/local/python2.7.12 /usr/local/python ln -s /usr/local/python/bin/python /usr/bin/python27
安装setuptools-25.1.3
tar xf setuptools-25.1.3.tar.gz cd setuptools-25.1.3 python27 setup.py build python27 setup.py install
安装ipython2.2.0
tar xf ipython-2.2.0.tar.gz cd ipython-2.2.0 python27 setup.py build python27 setup.py install ln -s /usr/local/python2.7.12/bin/ipython /usr/bin/ipython
启动ipython命令,有自动补全功能,即表明安装成功
[root@py ipython-2.2.0]# ipython Python 2.7.12 (default, Aug 3 2016, 20:55:32) Type "copyright", "credits" or "license" for more information. IPython 2.2.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython‘s features. %quickref -> Quick reference. help -> Python‘s own help system. object? -> Details about ‘object‘, use ‘object??‘ for extra details. In [1]: import math In [2]: math. math.acos math.ceil math.erfc math.frexp math.lgamma math.radians math.acosh math.copysign math.exp math.fsum math.log math.sin math.asin math.cos math.expm1 math.gamma math.log10 math.sinh math.asinh math.cosh math.fabs math.hypot math.log1p math.sqrt math.atan math.degrees math.factorial math.isinf math.modf math.tan math.atan2 math.e math.floor math.isnan math.pi math.tanh math.atanh math.erf math.fmod math.ldexp math.pow math.trunc In [2]: math.
本文出自 “sunny” 博客,请务必保留此出处http://francis198.blog.51cto.com/720670/1834107
原文地址:http://francis198.blog.51cto.com/720670/1834107