目的: 系统默认运行python, 系统提示2.6.6,不满足练习环境-->切到2.7.x步骤1: find 命令查找所有的python相关文件#find / name=‘python*‘ 2. 进入原来2.6.x python的路径,查看哪些和2.6相关.
ls python* -l
3. 删除2.6相关的python 绿色文件,如#mv /usr/bin/python #mv /usr/bin/python2.6*
4:wget在线或者离线下载python 2.7.13->解压 进入目录,安装三部曲,不再赘述 #./configure#make#make install 5.将新安装的2.7.13 python 软链接到python 即可.
ln -s /usr/local/python27/bin/python2.7 /usr/bin/python
6. 查看版本信息->python 2.7.13. Done.
#python -V
ln -s /usr/local/python27/bin/python2.7 /usr/bin/python
参考:http://www.cnblogs.com/liwei0526vip/p/6219998.html?utm_source=itdadao&utm_medium=referral
时间: 2024-12-26 11:55:05