CENTOS7 installation python3.6 and Module installation demo

Source: Internet
Author: User
Tags install openssl

Directory:
    • Download python3.6
    • Installation of python3.6 dependencies
    • Compiling the installation
    • Change link
    • Change the python dependency of the Yum script
    • Modifying the Gnome-weaktool configuration file
    • Modifying the Urlgrabber configuration file
1. Download python3.6

# wget Https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz

2, the installation of python3.6 dependence

# yum Install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel

3. Compile and install

# TAR-XZVF PYTHON-3.6.0.TGZ-C/tmp

# cd/tmp/python-3.6.0/

#./configure--prefix=/usr/local--enable-optimizations

# make

# Make Altinstall

4. Change the link

# Cd/usr/bin

# mv Python python.backup

# ln-s/usr/local/bin/python3.6/usr/bin/python

# ln-s/usr/local/bin/python3.6/usr/bin/python3

5. Change the python dependency of the Yum script

# Cd/usr/bin

# ls yum*

Yum Yum-config-manager Yum-debug-restore Yum-groups-manager

YUM-BUILDDEP Yum-debug-dump Yumdownloader

Change the above file header to #!/usr/bin/python to #!/usr/bin/python26, modify gnome-weaktool config file

Vi/usr/bin/gnome-tweak-tool

#!/usr/bin/python Change to #!/usr/bin/python2

7. Modify the Urlgrabber configuration file

# Vi/usr/libexec/urlgrabber-ext-down

#!/usr/bin/python Change to #!/usr/bin/python2

CENTOS7 installation python3.6 and Module installation demo

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.