Ubuntu下安装Mysql-Python1.2.5问题
Ubuntu下安装Mysql-Python1.2.5问题
安装步骤
1、进入官网下载对应的mysql-python 版本
https://pypi.org/project/MySQL-python/
2、解压
unzip MySQL-python-1.2.5.zip
3、进入对应目录安装
cd MySQL-python-1.2.5
python setup.py build
python setup.py install
遇到的坑
1、mysql_config: not found
解决方式:
sudo apt-get install libmysqlclient-dev
2、_mysql.c:29:10: fatal error: Python.h: No such file or directory
解决方式:
sudo apt-get install python-dev