macloo February 2016

Ignoring ensurepip failure: pip 7.1.2 requires SSL/TLS - Python 3.x & OS X

I am trying to install Python 3.5.1 according to these instructions:

http://thomas-cokelaer.info/blog/2014/08/installing-another-python-version-into-virtualenv/

I have: OS X 10.11.3, no Homebrew. Xcode is installed. Xcode Command Line Tools are installed.

Everything goes well until make install has run for a while. Then it quits with this:

if test "xupgrade" != "xno"  ; then \
        case upgrade in \
            upgrade) ensurepip="--upgrade" ;; \
            install|*) ensurepip="" ;; \
        esac; \
         ./python.exe -E -m ensurepip \
            $ensurepip --root=/ ; \
    fi
Ignoring ensurepip failure: pip 7.1.2 requires SSL/TLS

I have been searching for a long time and all I can find are instructions for Homebrew or for Apache or other servers. I understand that I've got to get SSL/TLS on my system, but I've had no luck.

The biggest reason I don't want Homebrew is that I want non-CS students to follow the same procedure, and I don't want them to install Homebrew.

Answers


thodnev February 2016

It gives You an error because it misses the openssl. However Apple no longer provides it in Xcode, so You need to manually install it fist. The simplest approach is to use Homebrew package manager(http://brew.sh/), install the required package, and then include openssl libs:

export CPPFLAGS=-I$(brew --prefix openssl)/include
export LDFLAGS=-L$(brew --prefix openssl)/lib

Added: for more detais, see: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md

Post Status

Asked in February 2016
Viewed 1,920 times
Voted 12
Answered 1 times

Search




Leave an answer