python 及 ipython 源码安装

python3和python2虽然语法有很大区别,但python2和python3源码安装是一样的, 这里以python3安装为例:

======================python3安装==================================

yum install -y openssl openssl-devel gdbm gdbm-devel gcc gcc-c++ bzip2 bzip2-devel lzma xz-devel

yum install -y xz-compat-libs ncurses ncurses-devel sqlite sqlite-devel readline readline-devel tk tk-devel

 

[root@Server ~]# tar -xzvf  Python-3.5.2.tar.gz

[root@Server ~]# cd Python-3.5.2

[root@Server Python-3.5.2]# ./configure --prefix=/usr/local/Python35

[root@Server Python-3.5.2]# make

[root@Server Python-3.5.2]# make install

[root@Server Python-3.5.2]# ln -sv /usr/local/python35/bin/python3.5 /usr/bin/python35

[root@Server Python-3.5.2]# python35

>>>

=====================Ipython安装====================================================

Ipython安装,ipython 可以补全

[root@Server ~]# tar -xzvf ipython-5.1.0.tar.gz

[root@Server ~]# cd ipython-5.1.0

[root@Server ipython-5.1.0]# /usr/local/python35/bin/python3.5 setup.py build

[root@Server ipython-5.1.0]# /usr/local/python35/bin/python3.5 setup.py install

[root@Server ipython-5.1.0]# /usr/local/python35/bin/python3.5 setupegg.py build

[root@Server ipython-5.1.0]# /usr/local/python35/bin/python3.5 setupegg.py install

[root@Server ipython-5.1.0]# ln -sv /usr/local/python35/bin/ipython3 /usr/bin/

[root@Server ipython-5.1.0]# ipython3

Python 3.5.2 (default, Sep 11 2016, 19:43:24) Type "copyright", "credits" or "license"

for more information. IPython 5.1.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]:  

=========================安装完毕=================================================

 

posted @ 2016-09-17 14:29  一干而尽  阅读(1058)  评论(0编辑  收藏  举报