The solution to the error when installing mysql-python (only applicable to python2)

1. Enter the command: sudo pip install mysql-python
 At this time, it may be reminded that the version of pip is not high enough and needs to be upgraded.
2. Enter the command to upgrade pip: sudo pip install --upgrade pip
3. Enter the command again at this time: sudo pip install mysql-python
still cannot be installed: EnvironmentError: mysql_config not found
3. This is the command to enter: sudo apt-get install python-dev
4. Continue to enter the command: sudo apt-get install libmysqlclient-dev
5. Enter the command again: sudo pip install mysql-python
 found that it can be successfully installed

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324430769&siteId=291194637