-
Notifications
You must be signed in to change notification settings - Fork 0
mysql python
KerwinKoo edited this page Dec 26, 2015
·
1 revision
如果不从新立德中下的话,需要去官网下载,
然后:python setup.py install
EnvironmentError: mysql_config not found
解决方案:
apt-get install libmysqlclient-dev
找到mysql_config文件的路径
sudo updatedb
locate mysql_config
mysql_config的位置为:/usr/bin/mysql_config
在mysql-python源码包下找到:setup_posix.py 文件,
然后找到文件中的 mysql_config.path
将其值改为:/usr/bin/mysql_config,
然后 sudo python setup.py install ,就ok了
error信息:
Setup script exited with error: command 'gcc' failed with exit status 1
解决方案:
sudo apt-get install python-dev
sudo apt-get install mysql-server
Sudo apt-get install mysql-client