㈠ Python 依賴包
# rpm -q gcc gdbm-devel readline-devel ncurses-devel zlib-devel bzip2-develsqlite-devel db4-devel openssl-devel tk-devel bluez-libs-devel make --qf '%{name}.%{arch}\n'|sort
㈡ 安裝 Python 2.7
# wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
# tar -zxv -f Python-2.7.3.tar.bz2
# cd Python-2.7.3
# ./configure
# make && make install
# cd /usr/local/lib/python2.7 /*預設安裝目錄在/usr/local/lib/python2.7*/
# /usr/local/bin/python -V /*查看一下剛才安裝的版本 /usr/local/bin/python -V,看到了 2.7*/
# mv /usr/bin/python /usr/bin/python.bak /*備份!!!*/
# ln -sf /usr/local/bin/python2.7 /usr/bin/python /*把系統預設的Python指向剛才安裝的Python2.7*/
# python -V
使用yum的話會發現出錯,這是因為yum 依賴2.4.3而現在預設的 Python 版本是 2.7
# yum list | grep gcc
There was a problem importing one of the Python modulesrequired to run yum. The error leading to this problem was: No module named yum
# vim /usr/bin/yum
將首行顯示的 #!/usr/bin/python 修改為 #!/usr/bin/python2.4或者2.3、總之、自己要去/usr/bin目錄下實地考察、確認是哪個才行、網上都是2.4啊、這估計是抄來抄去的結果
㈢ 安裝 IPython
# wget http://archive.ipython.org/release/0.13.2/ipython-0.13.2.tar.gz
# tar -zxv -f ipython-0.13.2.tar.gz
# cd ipython-0.13.2
# python setup.py install /*這裡需要注意的是、Python的版本最好比較高、否則這步容易出錯*/
# ln -sf /usr/local/bin/ipython /usr/bin/ipython /*做不做無所謂*/
By David Lin
2013-06-25
Good Luck