Library not found for -lssl error when trying to pip install things

Issues when trying to run pip install mysqlclient in OSX 10.12. I was getting:


ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1

Steps to fix:

* brew uninstall mysql
* brew install mysql-connector-c
* brew unlink mysql-connector-c
* brew install mysql
* xcode-select --install
* env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib"

I hope this helps someone else! 🙂

Leave a Reply

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