002-centos, install python2.7.9

Source: Internet
Author: User
Tags install openssl

Environment:

Centos6.7

Python 2.7.9


1. Install the CentOS operating system:

Yum Update

yum-y install vim wget

2, install python2.7.9

CentOS 6.6 comes with Python 2.6.6, while compiling LLVM requires more than Python 2.7. the newest in Yum is also Python 2.6.6, which can only download python 2.7.9 source code to compile and install itself.

1) Install Devtoolset

Yum Groupinstall "Development tools"

2) Install the packages needed to compile Python

Yum-y Install zlib-develyum-y Install bzip2-develyum-y install openssl-develyum-y install ncurses-develyum-y Install Sqlite-devel

3) Download and unzip the source code of the Python 2.7.9

Cd/optwget--no-check-certificate Https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xztar XF PYTHON-2.7.9.TAR.XZCD Python-2.7.9

4) Compiling and installing Python 2.7.9

./configure--prefix=/usr/localmake && make install

5) Point python command to Python 2.7.9

Mv/usr/local/bin/python/usr/local/bin/python2.6ln-s/usr/local/bin/python2.7/usr/local/bin/python

6) Check Python version python-v


This article is from the "Wild Goat" blog, please be sure to keep this source http://yeshanyang.blog.51cto.com/8845896/1772295

002-centos, install python2.7.9

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.