1, mounted pip
pip install mysql-python
- 1
2, abnormal if the following
EnvironmentError: mysql_config not found
- 1
Another mounted reliance
sudo apt-get install libmysqld-dev
- 1
3, install again
pip install mysql-python
- 1
4, after the installation is successful, enter the confirmation python environment
import MySQLdb