Greg Dougherty
Greg Dougherty

Reputation: 3471

Can't connect to HTTPS URL because the SSL module is not available on Mac/OS

Trying to build Python 2.7.17 and then install pip on Mac OS 10.14

Installed OpenSSL using brew

Python's build fails to build _ssl. When I try to build pip, it fails with error "Can't connect to HTTPS URL because the SSL module is not available

OpenSSL is correctly installed at /usr/local/Cellar/[email protected]/1.1.1d/

Upvotes: 1

Views: 1575

Answers (1)

Greg Dougherty
Greg Dougherty

Reputation: 3471

Python looks for ssl at /usr/local/ssl

To get it to build I did the following: 1. Set up a path to OpenSSL that didn't involve any weird characters:

cd /usr/local/Cellar/
ln -s openssl\@1.1 openssl

2: Ran ./configure

3: Edited Makefile replacing all "/usr/local/ssl" with "/usr/local/Cellar/openssl"

4: Run make / make test / make install

This created a Python that had _ssl, and thus pip would run

Upvotes: 0

Related Questions