Circumvent SSL errors when installing python packages via pip on OSX

Since I am using OS X “El Capitan” I started to have SSL issues when trying to install some packages:

fatal error: 'openssl/opensslv.h' file not found

The easiest fix would be using brew to detect the paths of the SSL library (of course brew and ssl must be already installed)

CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" pip install YOUR_PACKAGE

Leave a Reply

Your email address will not be published. Required fields are marked *