Install Python 2.7.9 and Python 3.4.x with pip.

** On the pip homepage, it was stated that pip is included in Pyhon 2.7.9 and later and Python 3.4 and later. ** **

pip included with Python

Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include pip by default [1], so you may have pip already.

** Let's install Python with pip. ** **

First, install OpenSSL for development.

Since Python will be built and installed on Linux, it is necessary to install the OpenSSL development package on which pip depends in advance. yum install openssl-devel Screenshot_from_2015-04-28 15^%07^%20.png If a confirmation is displayed on the way, enter "y" and press enter. Screenshot_from_2015-04-28 15^%07^%41.png When the installation is complete, you will see a nice message. Screenshot_from_2015-04-28 15^%08^%00.png

By the way, if OpenSSL for development is not included, this message will be displayed when installing Python. Of course, pip cannot be used either. Ignoring ensurepip failure: pip 6.0.8 requires SSL/TLS

Download the Python source code.

Open the Python home page. https://www.python.org/ Select Downloads Python 3.4.3 and Python 2.7.9 from the menu to download the compressed source code to any location. Please unzip it after downloading. Python-2.7.9.tar.xz Python-3.4.3.tar.xz 1.png

Install Python 2.7.9.

Install it in / usr / local.

cd Python-2.7.9
./configure --prefix=/usr/local
make
make altinstall

Screenshot_from_2015-04-28 15^%30^%16.png Screenshot_from_2015-04-28 15^%35^%44.png

** I get some warnings during compilation, but it doesn't seem to have any fatal errors. However, the installation completion message is not displayed after the installation is completed. ** **

I'm curious, so when I look at the installation destination, there is no pip executable file as expected. Screenshot_from_2015-04-28 15^%39^%16.png It is impossible to try to execute pip. pip2.7 Screenshot_from_2015-04-28 15^%46^%05.png

It can't be helped, so let's add pip manually. python2.7 -m ensurepip Install this module ʻensure pip` if pip is not included. It is a program that does nothing if pip is already included. Screenshot_from_2015-04-28 15^%46^%39.png It completed normally and the pip executable file was created. Screenshot_from_2015-04-28 15^%48^%28.png

Although it says Downloading during installation, the official documentation saysthis module does not access the internet. All required components are included in the package. Claims. It doesn't seem to have been downloaded from the net. https://docs.python.org/2/library/ensurepip.html

Note:
 This module does not access the internet. All of the components needed to bootstrap pip are included as internal parts of the package.

I was able to execute it. pip2.7 Screenshot_from_2015-04-28 15^%50^%07.png

** There are some parts that are not surprising, but for the time being, let's do it. ** **

Install Python 3.4.x.

This will also be installed in / usr / local.

cd Python-3.4.3
./configure --prefix=/usr/local
make
make altinstall

Screenshot_from_2015-04-28 16^%18^%42.png Screenshot_from_2015-04-28 16^%24^%43.png

As expected, it is the current mainstream. As far as I can see, there are no errors or warnings. A successfully installed message is also displayed.

An executable file for pip has also been created. Screenshot_from_2015-04-28 16^%26^%26.png

I was able to execute it without any problems. pip3.4 Screenshot_from_2015-04-28 16^%28^%03.png

You have now confirmed that the latest version of Python includes pip and can be installed at the same time as Python. Thank you for your hard work.

Recommended Posts

Install Python 2.7.9 and Python 3.4.x with pip.
[Python Windows] pip install with Python version
Python installation and package management with pip
scipy stumbles with pip install on python 2.7.8
Error with pip install
Install Voluptuous with Python 2.5
Install python with pyenv
Install scikit.learn with pip
Install pip in Serverless Framework and AWS Lambda with Python environment
Install lp_solve on Mac OS X and call it with python.
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
Install pip and pandas with Ubuntu or VScode
Install shogun with python modular (OS X Yosemite)
Install ZIP version Python and pip on Windows 10
x86 compiler self-made with python
Encryption and decryption with Python
Python and hardware-Using RS232C with Python-
Install Python and Flask (Windows 10)
Install Python environment with Anaconda
When moss with pip install
Install external libraries with Python
Install github repository with pip
Install Python 3.7 and Django 3.0 (CentOS)
python with pyenv and venv
Works with Python and R
Install selenium on Mac and try it with python
Install the latest stable Python with pyenv (both 2 and 3)
Start numerical calculation in Python (with Homebrew and pip)
Install tweepy with pip and use it for API 1.1
Shining life with Python and OpenCV
Word Count with Apache Spark and python (Mac OS X)
Robot running with Arduino and python
[Road to intermediate Python] Install packages in bulk with pip
Neural network with OpenCV 3 and Python 3
AM modulation and demodulation with python
[Python] font family and font with matplotlib
Scraping with Node, Ruby and Python
Until you can install your own Python library with pip
I can't install python3 with pyenv-vertualenv
install python
Install Python from source with Ansible
Scraping with Python, Selenium and Chromedriver
Permission denied with pip install pyopenssl
Install Python on Windows + pip + virtualenv
pip install mysql-Error handling during python
Scraping with Python and Beautiful Soup
Create an LCD (16x2) game with Raspberry Pi and Python
Install python3 and scientific calculation library on Ubuntu (virtualenv + pip)
Test Python with Miniconda on OS X and Linux with travis-ci
JSON encoding and decoding with python
Hadoop introduction and MapReduce with Python
[GUI with Python] PyQt5-Drag and drop-
Install the Python plugin with Netbeans 8.0.2
Manipulate colors with pip install color
Reading and writing NetCDF with Python
Unable to install Python with pyenv
I played with PyQt5 and Python3
Reading and writing CSV with Python
Install Python framework django using pip
Multiple integrals with Python and Sympy
How to install mysql-connector with pip3