Error Message:
EnvironmentError: mysql_config not found
Command “python setup.py egg_info” failed with error code 1 in /private/var/folders/nh/j05szmpj19368dd9_y6whgy40000gq/T/pip-install-n9Jonx/mysql-python/
I looked up the command to execute an environment variable online:
export PATH=$PATH:/usr/local/mysql/bin
Then another error was reported:
#include “my_config.h”
^~~~~~~~~~~~~
1 error generated.
error: command ‘cc’ failed with exit status 1
Finally, I used two methods
One is to first execute :
brew install mysql
Be sure to install through brew
Second, download directly:
https://dev.mysql.com/downloads/connector/python/
After downloading, you can access:
/ usr/local/mysql/bin In this folder, you can see that there is a file called mysql_Config file
Since I did both things at the same time, I can’t judge which is right and which is wrong, or both, and then execute it again:
export PATH=$PATH:/usr/local/mysql/bin
Latest run: Good install MySQL-Python
Similar Posts:
- Error in Python compilation on MAC no module named mysqldb
- Troubleshooting MySQL Python error on MAC
- EnvironmentError: mysql_config not found
- Mac version PIP install — upgrade PIP update version error
- [Solved] Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-9enuqi/My…
- How to Solve Error in installing MySQL Python in Pip
- CentOS 7: How to Solve Mysqlclient Install Error
- [How to Solve] ImportError: No module named MySQLdb
- [Solved] Python import module error: importerror: no module named mysql.connector
- MySQL_python‑1.2.5‑cp27‑none‑win_amd64.whl is not a valid wheel filename.