Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 857
macloo Avatar asked Feb 08 '16 22:02

macloo


1 Answers

It gives you an error because it misses OpenSSL. However Apple no longer provides OpenSSL in Xcode, so you need to manually install. The simplest approach is to use the Homebrew package manager, install the required package, and then include the OpenSSL libs:

export CPPFLAGS="${CPPFLAGS} -I$(brew --prefix openssl)/include"
export LDFLAGS="${LDFLAGS} -L$(brew --prefix openssl)/lib"
like image 164
thodnev Avatar answered Oct 20 '22 03:10

thodnev