Cannot install MySQL-python at macOS 10.13 Beta

Round #1

Complete output from command python setup.py egg_info:
    sh: mysql_config: command not found

Solution

brew install mysql
# or
brew reinstall mysql

Round #2

clang -bundle -undefined dynamic_lookup ****/_mysql.o -L/usr/local/Cellar/mysql/5.7.18_1/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.12-x86_64-2.7/_mysql.so
ld: library not found for -lssl

Solution

brew install openssl
export LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib"
pip install mysql-python

Sometimes, you need xcode-select --install

Leave a Reply

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