Python version upgrade

Source: Internet
Author: User

[Email protected]~]# yum-y Install gcc gcc-c++

[Email protected]/soft]# wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz

[Email protected]/soft]# tar xvf python-3.6.5.tgz

[Email protected]/soft/python-3.6.5]#/configure--prefix=/usr/local/python3.6.5

[[email protected]/soft/python-3.6.5]# make && make install

[[Email protected]/usr/bin]# RM python

[Email protected]/usr/bin]# Ln-sv/usr/local/python3.6.5/bin/python3/usr/bin/python

[Email protected] ~]# python-v

Python 3.6.5

?

Attention:

Since Yum uses python2, it may not work properly after being replaced with py3;

[email protected] ~]# Yum list

File "/usr/bin/yum", line 30

Except Keyboardinterrupt, E:

^

Syntaxerror:invalid syntax

The Yum configuration file can be modified to resolve;

[Email protected] ~]# head-1/usr/bin/yum

#!/usr/bin/python2.7

Python version upgrade

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.