The problem of upgrading python2.7 to python3.6 in centos7.3

After the upgrade, yum cannot be used, and the error is as follows
File "/bin/yum", line 30
except KeyboardInterrupt, e:
^
SyntaxError: invalid syntax

File "/usr/libexec/urlgrabber-ext-down", line 28
except OSError, e:
^
SyntaxError: invalid syntax


Solution
Modify the following three files
/usr/bin/yum
/usr/libexec/urlgrabber-ext-down
/usr/bin/yum-config-manager

Change the #!/usr/bin/python at the beginning to #!/usr/bin/python2.7

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324742972&siteId=291194637