Red Hat Linux下安装Python-2.7.3

Red Hat Linux下安装Python-2.7.3


1、首先到官网下载Python-2.7.3安装文件
由于我的电脑是32位的所以我下载的安装文件为:
Python-2.7.3.tar.bz2
2、在usr/local目录下建立一个名为Python2.7的文件夹
# cd /usr/local
mkdir Python2.7
然后通过文件共享把Python-2.7.3.tar.bz2安装包拷贝到Python2.7文件夹中
# cd /mnt/hgfs 
# cp Python-2.7.3.tar.bz2 /usr/local/Python2.7
3、安装Python2.7
用cd命令进入/usr/local/jdk目录:
# cd /usr/local/Python2.7
# ls


先解压安装文件Python-2.7.3.tar.bz2


# bunzip Python-2.7.3.tar.bz2
# ls
# tar -xvf Python-2.7.3.tar
# ls
解压后得到:
Python-2.7.3文件夹
# cd Python-2.7.3


4、正式安装Python-2.7.3
# ./configure
# make
# make install

5、验证安装是否成功

[root@localhost Python-2.7.3]# python
Python 2.7.3 (default, Apr 12 2014, 16:53:32)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.


说明安装成功!2014/4/12

你可能感兴趣的:(linux学习笔记)