Centos6.8 Installing the Python environment

Source: Internet
Author: User
Tags install openssl

I. Installation steps
1. Check the system python
CentOS 6.8 comes with Python 2.6.6,yum, the newest and Python 2.6.6, and can only download Python 2.7.12 's source code to compile and install itself. Such as:

    1. Installing development tools
      #yum-y Groupinstall "Development tools"
    2. Install packages required for compiling Python
      #yum Install Zlib-devel-y

      #yum Install Bzip2-devel-y

      #yum Install Openssl-devel-y

      #yum Install Ncurses-devel-y

      #yum Install Sqlite-devel-y

      #yum Install Tcl-devel–y

#yum Install Tk-devel-y
4. Download and unzip the source code of the Python 2.7.12
#cd/opt
#wget--no-check-certificate Https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tar.xz
#tar XF Python-2.7.12.tar.xz
#cd Python-2.7.12

#tar XF Python-2.7.12.tar.xz
#cd Python-2.7.12

    1. Compiling and installing Python 2.7.12
      #./configure--prefix=/usr/local
      #make && make Install
      6. Point the python command to the Python 2.7.12cd/usr/bin

#rm –RF python

#ln-S/usr/local/bin/python2.7/usr/bin/python

#python –version

Completed by the python2.7 installation shown

If you are interested in this, please scan the QR code below for free for more details

Centos6.8 Installing the Python environment

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.