Install PIP under multiple versions of Python

Source: Internet
Author: User

The day before yesterday installed in CentOS python2.7.12 and python3.5.2, today to install two versions of PIP, from the official download get-pip.py, using Python get-pip.py, error, unable to install. By looking for the reason, it was finally installed.


Let me explain here:

1. Problems that arise

1), no zlib library

2), no Httpshander library

2. Solution

Before the two versions of Python are installed, two libraries Zlib-devel and openssl-devel need to be installed, and after the installation is complete, the PIP can be installed properly after the Python is compiled and installed.


To summarize, install the process:

1. Installation Library

Yum Install Zlib-devel openssl-devel-y

Install the two development libraries, if not installed, there will be no zlib and httpshander libraries after the Python installation is complete.


2. Install Python

./configure--prefix=/usr/local/python27

Make && make install

Ln-s/usr/local/python27/bin/python2.7/usr/bin/python


python3.5.2

Similar to python2.7.12, slightly different, think about it yourself


3. Install Pip

wget https://bootstrap.pypa.io/get-pip.py--no-check-certificate

Python get-pip.py

Install PIP under python3.5.2 similar to 2.7, please think about it, there is no writing.


This article is from the "Road" blog, please make sure to keep this source http://4330156.blog.51cto.com/4320156/1828980

Install PIP under multiple versions of Python

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.