CentOS 7.3 Installation Configuration python3.6.1

Source: Internet
Author: User

1. Install some of the dependencies I have encountered (if there are dependencies on the prompts to install):

Yum install xz gcc zlib zlib-devel

2. Download the source package on official website

Address: Https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz

3. Extracting files

Xz-d PYTHON-3.6.1.TAR.XZ

TAR-XVF Python-3.6.1.tar

4. Go to the file directory

CD Python-3.6.1

5. Start the installation compilation

./configure--prefix=/usr/python3.6 Make do install

6. Let the CENTOS7 system use python3.6 by default

CD/USR/BIN/MV python python.bakln-s/usr/python3.6/bin/python3/usr/bin/python

7. Since Yum is using Python2, replacing python3 may result in a failure to work properly, Continue to use this python2.7.5 because Yum uses python2, so replacing it with Python3 may not work, continue using this python2.7.5

Therefore, the Yum configuration file (Vim/usr/bin/yum) is modified. Change the #!/usr/bin/python of the file head to #!/usr/bin/python2.7 save exit

CentOS 7.3 Installation Configuration python3.6.1

Related Article

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.