CentOS 5.5にPython 2をアップグレードする.7 Djangoインストール

1426 ワード

, ,python3 , 2.7 , ~

, python 2.4 2.7

, , , , 。。。。。

VM ~ vsftp, python2.7.tgz

#tar -zxf Python2.7.tgz //   
#cd Python2.7
#mkdir /usr/local/python2.7 //      
#configure --prefix=/usr/local/python2.7  //  ,    
#make && make install //  &&  
#mv /usr/bin/python /usr/bin/python_2.4 //       
#ln -s /usr/local/python2.7/bin/python2.7 /usr/bin/python //    python     
#python
Python 2.7.3 (default, Jan 11 2013, 22:55:30)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Django

#tar -zxf Django.tar.gz
#cd Django
#python setup.py install
#python
Python 2.7.3 (default, Jan 11 2013, 22:55:30)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

>>> import django
>>> django.VERSION
(1, 4, 3, final', 1) //OK