解决问题:OSError: mysql_config not found
通过pip install mysqlclient
时报出了OSError: mysql_config not found
错误,如下
Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-o4j1ozxx/mysqlclient/setup.py", line 17, in <module> metadata, options = get_config() File "/tmp/pip-build-o4j1ozxx/mysqlclient/setup_posix.py", line 44, in get_config libs = mysql_config("libs_r") File "/tmp/pip-build-o4j1ozxx/mysqlclient/setup_posix.py", line 26, in mysql_config raise EnvironmentError("%s not found" % (mysql_config.path,)) OSError: mysql_config not found ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-o4j1ozxx/mysqlclient/ You are using pip version 9.0.3, however version 19.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
解决办法
yum install mysql-devel gcc gcc-devel python-devel