首页 > 代码库 > 安装ipython
安装ipython
安装ipython必须要用python2.7以上的包,centos6.5上的python是2.6.6的,版本不够,所以要从官网下载python2.7.9的安装包 |
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz |
解压压缩包 |
xz -d Python-2.7.9.tar.xz |
tar xvf Python-2.7.9.tar |
yum install readline-devel <-----一定要安装这个东东,不然后面安装好ipython后,就算命令写错,也不能删除,而且不能用tab键来自动补充命令,头大大的。。。 |
安装python2.7.9到/usr/local/python27 |
cd Python-2.7.9 |
./configure --prefix=/usr/local/python27 |
yum install gcc <------centos 6.5没有自带gcc,这里要安装一下 |
make & make install |
|
|
[root@localhost bin]# /usr/local/python27/bin/python2.7 Python 2.7.9 (default, Dec 15 2014, 19:02:08) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> ll |
|
下载ipython |
cd /usr/local/src/ |
wget https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz#md5=2b7085525dac11190bfb45bb8ec8dcbf |
tar zxvf ipython-2.3.1.tar.gz |
用python2.7安装ipython |
cd ipython-2.3.1 |
/usr/local/python27/bin/python2.7 setup.py install |
|
|
将安装的python2.7.9和ipython连接到/usr/bin/下 |
`/usr/bin/python27‘ -> `/usr/local/python27/bin/python2.7‘
[root@localhost bin]# ln -sv /usr/local/python27/bin/ipython /usr/bin/ `/usr/bin/ipython‘ -> `/usr/local/python27/bin/ipython‘
ipython可以用了 [root@localhost bin]# ipython WARNING: IPython History requires SQLite, your history will not be saved WARNING: Readline services not available or not loaded. WARNING: The auto-indent feature requires the readline library Python 2.7.9 (default, Dec 15 2014, 19:02:08) Type "copyright", "credits" or "license" for more information.
IPython 2.3.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]: |
至此,ipython安装完毕 |
本文出自 “夜的眼睛” 博客,请务必保留此出处http://easton.blog.51cto.com/3868248/1590149
安装ipython