linux升級python到2.7python
1、下載python2.7安裝包linux
# wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz
2、解壓bash
# tar -zxf Python-2.7.12.tgz # cd Python-2.7.12
3、新建安裝目錄,防止覆蓋舊版本python2.7
# mkdir /usr/local/python27
4、安裝ide
# cd Python-2.7.12 # ./configure --prefix=/usr/local/python27 # make && make install
5、舊版python更名測試
# mv /usr/bin/python /usr/bin/python24
6、建立連接到新版本spa
# ln -s /usr/local/python27/bin/python2.7 /usr/bin/python
7、測試orm
# python Python 2.7.12 (default, Sep 2 2016, 09:17:20) [GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>