I'm trying to compile Python 3.6.2 on macOS 10.11 according to the instructions on https://bugs.python.org/issue29095. I've used homebrew to install openSSL to the standard location and then added LDFLAGS, CFLAGS, and CPPFLAGS to my env: $ printenv | grep FLAGS LDFLAGS=/usr/local/Cellar/openssl/1.0.2l/lib/ CFLAGS=-I/usr/local/Cellar/openssl/1.0.2l/include/openssl CPPFLAGS=-I/usr/local/Cellar/openssl/1.0.2l/include/openssl Then in that same shell, I compile Python to the custom location required for my use case: $ sudo ./configure --prefix=/oebuild/python/python-3.6.1 $ sudo make $ sudo make install However, the SSL module doesn't get built. The build log says this: Python build finished successfully! The necessary bits to build these optional modules were not found: _gdbm _ssl ossaudiodev spwd To find the necessary bits, look in setup.py in detect_modules() for the module's name. Continue reading...