python3 down to python2

1. First check the current python version

[root@test bin]# python
Python 2.7.5 (default, Aug  4 2017, 00:39:18) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

2. Check the python version in the /usr/bin directory

[root@test admin]# cd  /usr/bin/
[root@test bin]# ll

3. Delete python in the /usr/bin directory 

rm -rf /usr/bin/python

4. Add python2.7 soft link

ln -s /usr/bin/python2.7 /usr/bin/python

5. Check the python version

[root@test bin]# python
Python 2.7.5 (default, Aug  4 2017, 00:39:18) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Guess you like

Origin blog.csdn.net/songyun333/article/details/130616047