How to install MySQL-python by pip?

為{幸葍}努か 提交于 2019-12-01 18:42:08
Paul Stoner

I understand now. Thank you for the clarification.

I've been working on your setup and duplicated the result. Further research indicates that MySQL-python is only for Python 2.x. One recommendation I found is to use mysqlclient, but when I installed it I received the same error.

However, I am on a Windows 10 dev box using Visual Studio 2015 and I see an error regarding a file "my_config.h" is missing. Not certain if this is just my box or what.

I did find that installing PyMySql did seem to work, from an installation view point. I simply did pip install pymysql inside my virtual env. I found this solution here

I hope this helps.

brew install mysql

After installation is complete, mysql path will be shown at the last. Use it in command

sudo PATH=/usr/local/Cellar/mysql/bin/:$PATH pip install mysql-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!