0

I can not install the mysqlclient in CentOS7.2 using pip:

$ pip install "mysqlclient" Collecting mysqlclient Using cached mysqlclient-1.3.12.tar.gz Complete output from command python setup.py egg_info: /bin/sh: mysql_config: did not found the command Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-hg0dbjgz/mysqlclient/setup.py", line 17, in <module> metadata, options = get_config() File "/tmp/pip-build-hg0dbjgz/mysqlclient/setup_posix.py", line 44, in get_config libs = mysql_config("libs_r") File "/tmp/pip-build-hg0dbjgz/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-hg0dbjgz/mysqlclient/ 

And I have install my MySQL correctly in my server.

$ mysql --version mysql Ver 14.14 Distrib 5.6.38, for Linux (x86_64) using EditLine wrapper 

But I can not install

    1 Answer 1

    1

    You should install the python-devel and mysql devel first use yum:

    yum install python-devel mysql-community-devel -y 

    then you can install mysqlclient

      Start asking to get answers

      Find the answer to your question by asking.

      Ask question

      Explore related questions

      See similar questions with these tags.