uytr 发表于 2016-8-4 08:52:24

python2.7.12+ipython2.2.0安装过程

   ipython是python的增强环境,可以语法着色,自动补全,功能 强大
先安装基本环境包

1
2
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

1
2
3
4
5
6
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

1
2
3
4
tar xf setuptools-25.1.3.tar.gz
cd setuptools-25.1.3
python27 setup.py build
python27 setup.py install




安装ipython2.2.0

1
2
3
4
5
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命令,有自动补全功能,即表明安装成功

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# ipython
Python 2.7.12 (default, Aug3 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 : import math

In : 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.factorialmath.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 : math.



页: [1]
查看完整版本: python2.7.12+ipython2.2.0安装过程