参考文档:http://blog.chinaunix.net/uid-20749043-id-1878299.html
Python2.5的安装方法:
2. 安装
xz -d Python-3.4.3.tar.xz
tar xvf Python-3.4.3.tar
cd Python-3.4.3
./configure
make
make install
3. 测试
在命令行下输入python,出现python解释器即表示已经正确安装。
如果系统默认已经装了python但版本是2.X;本次安装后在shell中输入#python
会发现显示是之前的版本。
解决办法:
#cd /usr/bin
#ll |grep python //查看该目录下python
#rm -rf python
#ln -s PREFIX/Python-3.4.3/python ./python //PREFIX为你解压python的目录
#python
Python 3.4.3 (default, Apr 13 2015, 08:32:22)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
OK
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29974949/viewspace-1572096/
,如需转载,请注明出处,否则将追究法律责任。