install MySQL-python

来源:互联网 发布:24小时学通qt编程 pdf 编辑:程序博客网 时间:2024/06/06 09:01

如果想要用Python链接mysql,需要先安装MySQL-python,

步骤1:

执行:pip install MySQL-python

如果报以下错误:

EnvironmentError: mysql_config not found----------------------------------------Command python setup.py egg_info failed with error code 1

则需要先执行:

sudo apt-get install build-essential python-dev libmysqlclient-dev

然后再执行步骤1.


参考:

http://stackoverflow.com/questions/7459766/installing-mysql-python

0 0