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 

版权声明:本文为LiuBingBlogs原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/LiuBingBlogs/p/9823248.html