Python-2.7.6 Installation ~

Source: Internet
Author: User
Tags install openssl

First, check to see if the dependent environment is installed

GCC is the most basic development library, GCC–V query the version of GCC, if the following information proves that GCC is installed, if "command not found" proves not installed, need to install through Yum, the command is as follows:
Yumgroupinstall "Development Tools"
Yum Install zlib
Yum Install Zlib-devel

Install all the development tools after installation, and then use GCC–V if the installation is successful.
Installing OpenSSL
Yum Install openssl*-y

Second, Python installation
Tar zxvf python-2.7.6.tgz
CD Python-2.7.6
Because Python currently enforces full support for SSL, it needs to be modified

VI Python-2.7.6/modules/setup
#Socket Module Helper for Socket (2)
_socket socketmodule.ctimemodule.c
#Socket Module helper for SSL support; You must comment out of the other
#socket line above, and possibly edit the SSL variable:****
#SSL =/usr/local/ssl
_ssl _ssl.c \
-duse_ssl-i$ (SSL)/include-i$ (SSL)/INCLUDE/OPENSSL \
-l$ (SSL)/lib-lssl-lcrypto

Make &&make Install

Vim/usr/bin/yum, modify the first behavior #!/usr/bin/python2.6.6, avoid the later Yum use error.

The installation is complete and can be verified manually ~

Installing the Python Extender
Installing Setuptools
Tar XF setuptools-1.4.2.tar.gz
CD setuptools-1.4.2
/opt/python2.7.6/bin/python Install

Install PIP
Go to download pip\ Copy the link inside pip9.01
wget--no-check-certificate abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5= 35f01da33009719497f01a4ba69d63c9
Tar XF pip-9.0.1.tar.gz
CD pip-9.0.1
/opt/python2.7.6/bin/python Install
Make a soft connection

/opt/python2.7.6/bin/pip Install URLLIB3
/OPT/PYTHON2.7.6/BIN/PIP Install Requests
/opt/python2.7.6/bin/pip Install ThreadPool
/opt/python2.7.6/bin/pip Install Pyopenssl

Installing Supervisor
/OPT/PYTHON2.7.6/BIN/PIP Install Supervisor
Start Supervisord

Python-2.7.6 Installation ~

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: 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.