Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos upgrade python version (yum installation)

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

In 2020, the official support for python2 has been terminated, so the server will slowly keep up with the trend. The upgrade process is as follows:

1 、 # yum intall python3

2. Check the version after installation is complete

Python3-V Python 3.6.8

3. Modify the system default python command

# cd / usr/bin

# mv python python.bak

# ln-s python3 python

# python-V

Python 3.6.8

The upgrade is completed by this version. In order to avoid the failure of yum (based on python2), you also need to modify the settings of yun.

1 、 # cp / usr/bin/yum / usr/bin/yum.bak

Vi / usr/bin/yum change #! / usr/bin/python to #! / usr/bin/python2

2 、 # cp / usr/libexec/urlgrabber-ext-down / usr/libexec/urlgrabber-ext-down.bak

Vi / usr/libexec/urlgrabber-ext-down change #! / usr/bin/python to #! / usr/bin/python2

The above is the whole process of this revision

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report