Old openssl causes problems in various parts of python

This problem caused 3 hours to disappear.

The biggest problem

easy_install doesn't find the required package. The same is true for pip.

# easy_install pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found!
Couldn't retrieve index page for 'pip'
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found!
Best match: pip 6.0.6
Processing pip-6.0.6-py2.7.egg
pip 6.0.6 is already the active version in easy-install.pth
Installing pip script to /home/akisato/src/downloads/python-2.7.8/bin
Installing pip2.7 script to /home/akisato/src/downloads/python-2.7.8/bin
Installing pip2 script to /home/akisato/src/downloads/python-2.7.8/bin

Using /home/akisato/src/downloads/python-2.7.8/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg

# pip install setuptools --upgrade
Could not find any downloads that satisfy the requirement setuptools in ./lib/python2.7/site-packages/setuptools-12.0.1-py2.7.egg
Collecting setuptools
  No distributions at all found for setuptools in ./lib/python2.7/site-packages/setuptools-12.0.1-py2.7.egg

I wish I could yum

You might think that you should do yum install openssl-devel, but you can't do it for the average person without root privileges. : p

What to do for the time being

First, get tar.gz of pip and install it.

# wget https://pypi.python.org/packages/source/p/pip/pip-6.0.6.tar.gz --check-no-certificate
# tar xzvf pip-6.0.6.tar.gz
# cd pip-6.0.6.tar.gz
# python setup.py build
# python setup.py install

If this is left as it is, pip will fail to verify SSL due to the old OpenSSL, so modify pip. (Reference: docs / TSUBAME http://www.kyogoku.biz/docs/TSUBAME)

# vim ~/src/downloads/python-2.7.6rc1/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/downloads.py
Next to the line that says Dispatch the actual request,
return super(PipSession, self).request(method, url, verify=False, *args, **kwargs)
Rewrite as.(verify=Add False.) 

This should have solved the problem for the moment.

# pip install python
Collecting ipython
  Downloading ipython-2.3.1-py27-none-any.whl (2.8MB)
    100% |################################| 2.8MB 274kB/s
Installing collected packages: ipython

Successfully installed ipython-2.3.1

Recommended Posts

Old openssl causes problems in various parts of python
Summary of various for statements in Python
Combining problems in Python
Various processing of Python
About various encodings of Python 3
Equivalence of objects in Python
Check OpenSSL version of python 2.6
Solve optimization problems in Python
Implementation of quicksort in Python
I measured various methods of interprocess communication in multiprocessing of python3
[Tips] Problems and solutions in the development of python + kivy
Solution for MacOS Catalina (10.15.2), python pip causes OpenSSL error in environment updated from old OS
Pixel manipulation of images in Python
[SIR model analysis] Peak out of infections in various parts of Japan ♬
Division of timedelta in Python 2.7 series
MySQL-automatic escape of parameters in python
Handling of JSON files in Python
Implementation of life game in Python
Waveform display of audio in Python
Summary of various operations in Tensorflow
Law of large numbers in python
Implementation of original sorting in Python
Various ways to create an array of numbers from 1 to 10 in Python.
Reversible scrambling of integers in Python
Conversion of string <-> date (date, datetime) in Python
Check the behavior of destructor in Python
(Bad) practice of using this in Python
General Theory of Relativity in Python: Introduction
Mosaic images in various shapes (Python, OpenCV)
Output tree structure of files in Python
Display a list of alphabets in Python 3
Comparison of Japanese conversion module in Python3
Create Qt designer parts in Python (PyQt)
The result of installing python in Anaconda
Comparison of solutions in weight matching problems
[Python] Solve 10 past elite problems of Atcoder
Gang of Four (GoF) Patterns in Python
The basics of running NoxPlayer in Python
Bulk replacement of strings in Python arrays
Project Euler # 16 "Sum of Powers" in Python
1. Statistics learned with Python 1-3. Calculation of various statistics (statistics)
Traffic Safety-kun: Recognition of traffic signs in Python
Various format specifications of str.format () method of Python3
Summary of built-in methods in Python list
Non-logical operator usage of or in python
In search of the fastest FizzBuzz in Python
[Python] Various combinations of strings and values
Practical example of Hexagonal Architecture in Python
Project Euler # 17 "Number of Characters" in Python
Double pendulum equation of motion in python
Get rid of DICOM images in Python
Status of each Python processing system in 2020
Project Euler # 1 "Multiples of 3 and 5" in Python
Meaning of using DI framework in Python
Studying Mathematics in Python: Solving Simple Probability Problems
Output the number of CPU cores in Python
Draw a graph of a quadratic function in Python
[Python] Sort the list of pathlib.Path in natural sort
Receive websocket of kabu station ® API in Python
Project Euler # 10 "sum of prime numbers" in Python
Unattended operation of Google Spreadsheets (etc.) in Python