MacOS 安装MysqlDB 问题解决方案( 解决 IndexError: string index out of range)

pip install MySQL-python时报错如下:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/wk/541xl0m91gj7562sn0ddpjg9k8mh7p/T/pip-install-FF6W2Y/MySQL-python/

解决方案:brew install mysql
brew unlink mysql
brew install mysql-connector-c
sed -i -e 's/libs="$libs -l "/libs="$libs -lmysqlclient -lssl -lcrypto"/g' /usr/local/bin/mysql_config
pip install MySQL-python
brew unlink mysql-connector-c
brew link --overwrite mysql
尊重原创 原文地址:https://blog.csdn.net/eri_feng/article/details/81224106 

猜你喜欢

转载自www.cnblogs.com/LiuBingBlogs/p/9823248.html