438   Python

服务器是redhat5,python是2.4,需要升级到2.7

1,下载python2.7和解压

$ wget http://python.org/ftp/python/2.7.2/Python-2.7.2.tgz
$ tar -zxvf Python-2.7.2.tgz

2,安装

$ cd Python-2.7.2
$ ./configure 
$ make && make install

3,配置

$ mv /usr/bin/python /usr/bin/python2.4-bak
$ ln -s /usr/local/bin/python2.7 /usr/bin/python

4,更改yum的python

$ vim /usr/bin/yum
#!/usr/bin/python 更改为 #!/usr/bin/python2.4 



Trackbacks/Pingbacks

  1.  学习Django(1)安装 | LuckyBird

Leave a Reply

Your email address will not be published. Required fields are marked *