centos6.5安装python3.5 和 ipython

云盘包地址 :http://pan.baidu.com/s/1bpsgXUf环境 centos 6.5 最小化安装版,装好开发环境包。

①安装python3.5

yum install readline-devel -y  #不安装会导致python解释器里面没法用删除键等
tar -zxvf Python-3.5.1.tgz
cd Python-3.5.1
./configure –prefix=/usr/local –enable-shared
make && make install
ln -s /usr/local/bin/python3 /usr/bin/python3
echo /usr/local/lib >> /etc/ld.so.conf

ldconfig
#安装完成,执行下
[root@localhost ~]# python3
Python 3.5.1 (default, Jun 29 2016, 15:56:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>>



②安装python2.7
tar -zxvf Python-2.7.9.tgz
cd Python-2.7.9
./configure –prefix=/usr/local/python27
make && make install
ln -s /usr/local/python27/bin/python2.7 /usr/bin/python27
#2.7 安装完成,测试
[root@localhost ipython-0.13.1]# python27
Python 2.7.9 (default, Jun 29 2016, 16:05:04)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>



③安装ipython
tar -zxvf ipython-0.13.1.tar.gz
cd ipython-0.13.1
python27 setup.py build
python27 setup.py build install
ln -s /usr/local/python27/bin/ipython /usr/bin/

#安装完成,测试
[root@localhost ~]# ipython
WARNING: IPython History requires SQLite, your history will not be saved
Python 2.7.9 (default, Jun 29 2016, 16:05:04)
Type “copyright”, “credits” or “license” for more information.

IPython 0.13.1 — 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]: s
%%script      %%sx          %save         %store        %system       setattr       sorted        str           super
%%sh          %%system      %sc           %sx           set           slice         staticmethod  sum

In [1]: s




      本文转自无形于有形  51CTO博客,原文链接:http://blog.51cto.com/jinchuang/1844412,如需转载请自行联系原作者





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值