Centos 6 安裝 python2.7 和 pip

1、安裝 python2.7html

[root@crazy-acong ~]# cd /data/tools/
[root@crazy-acong tools]# yum groupinstall "Development tools"
[root@crazy-acong tools]# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
[root@crazy-acong tools]# wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz        
[root@crazy-acong tools]# tar -xf Python-2.7.13.tar.xz 
[root@crazy-acong tools]# cd Python-2.7.13
[root@crazy-acong Python-2.7.13]# ./configure
[root@crazy-acong Python-2.7.13]# make
[root@crazy-acong Python-2.7.13]# make install
[root@crazy-acong Python-2.7.13]# mv /usr/local/bin/python /usr/local/bin/python2.6
[root@crazy-acong Python-2.7.13]# ln -s /usr/local/bin/python2.7 /usr/local/bin/python

此時從新鏈接ssh
[root@crazy-acong ~]# python -V
Python 2.7.13

2、安裝 pippython

參考連接:http://www.cnblogs.com/CongZhang/p/5111195.htmlsql

相關文章
相關標籤/搜索