码迷,mamicode.com
首页 > 编程语言 > 详细

centos6.5安装python3.5 和 ipython

时间:2016-08-30 23:03:55      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:python3.5

云盘包地址 :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


本文出自 “jinchuang” 博客,请务必保留此出处http://jinchuang.blog.51cto.com/8690689/1844412

centos6.5安装python3.5 和 ipython

标签:python3.5

原文地址:http://jinchuang.blog.51cto.com/8690689/1844412

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!