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

作者

Robert Lu

发布于

2017-06-26

许可协议

评论