title: Error installing mysqlclient with MariaDB 10.2
body: <p>I have both installed python_devel and mysql_devel (that is MariaDB devel) still I get a file not found error when installing mysqlclient with pip:</p>
  
  <pre><code>Package python-devel-2.7.5-48.el7.x86_64 already installed and latest version
  Package MariaDB-devel-10.2.8-1.el7.centos.x86_64 already installed and latest version
  Nothing to do
  root@host [~]# pip install mysqlclient
  Collecting mysqlclient
    Using cached mysqlclient-1.3.10.tar.gz
  Installing collected packages: mysqlclient
    Running setup.py install for mysqlclient ... error
      Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-WQf5SH/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-moASQ3-record/install-record.txt --single-version-externally-managed --compile:
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-2.7
      copying _mysql_exceptions.py -&gt; build/lib.linux-x86_64-2.7
      creating build/lib.linux-x86_64-2.7/MySQLdb
      copying MySQLdb/__init__.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb
      copying MySQLdb/compat.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb
      copying MySQLdb/connections.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb
      copying MySQLdb/converters.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb
      copying MySQLdb/cursors.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb
      copying MySQLdb/release.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb
      copying MySQLdb/times.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb
      creating build/lib.linux-x86_64-2.7/MySQLdb/constants
      copying MySQLdb/constants/__init__.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb/constants
      copying MySQLdb/constants/CLIENT.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb/constants
      copying MySQLdb/constants/CR.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb/constants
      copying MySQLdb/constants/ER.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb/constants
      copying MySQLdb/constants/FIELD_TYPE.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb/constants
      copying MySQLdb/constants/FLAG.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb/constants
      copying MySQLdb/constants/REFRESH.py -&gt; build/lib.linux-x86_64-2.7/MySQLdb/constants
      running build_ext
      building '_mysql' extension
      creating build/temp.linux-x86_64-2.7
      gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,3,10,'final',0) -D__version__=1.3.10 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
      _mysql.c:29:23: fatal error: my_config.h: No such file or directory
       #include "my_config.h"
                             ^
      compilation terminated.
      error: command 'gcc' failed with exit status 1
  
      ----------------------------------------
  Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-WQf5SH/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-moASQ3-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-WQf5SH/mysqlclient/
  r
  </code></pre>
  
  <p>While maria and mysql headers are there that file is not:</p>
  
  <pre><code>root@host [~]# ls -al  /usr/include/mysql
  total 188
  drwxr-xr-x  5 root root  4096 Aug 23 02:39 ./
  drwxr-xr-x 71 root root 12288 Aug 23 16:48 ../
  -rw-r--r--  1 root root  3527 Aug 17 06:05 errmsg.h
  -rw-r--r--  1 root root  1602 Aug 17 06:05 ma_list.h
  -rw-r--r--  1 root root  4329 Aug 17 06:05 ma_pvio.h
  -rw-r--r--  1 root root  4111 Aug 17 06:05 ma_tls.h
  drwxr-xr-x  2 root root  4096 Aug 23 02:39 mariadb/
  -rw-r--r--  1 root root 17223 Aug 17 06:05 mariadb_com.h
  -rw-r--r--  1 root root  2593 Aug 17 06:05 mariadb_ctype.h
  -rw-r--r--  1 root root  8199 Aug 17 06:05 mariadb_dyncol.h
  -rw-r--r--  1 root root 11227 Aug 17 06:05 mariadb_stmt.h
  -rw-r--r--  1 root root   852 Aug 17 06:11 mariadb_version.h
  drwxr-xr-x  2 root root  4096 Aug 23 02:39 mysql/
  -rw-r--r--  1 root root 40532 Aug 17 06:05 mysql.h
  -rw-r--r--  1 root root 43551 Aug 17 06:15 mysqld_error.h
  drwxr-xr-x  4 root root  4096 Aug 23 02:39 server/
  root@host [~]# ls -al  /usr/include/mysql/mariadb
  total 12
  drwxr-xr-x 2 root root 4096 Aug 23 02:39 ./
  drwxr-xr-x 5 root root 4096 Aug 23 02:39 ../
  -rw-r--r-- 1 root root 1619 Aug 17 06:05 ma_io.h
  root@host [~]# ls -al  /usr/include/mysql/mysql
  total 28
  drwxr-xr-x 2 root root 4096 Aug 23 02:39 ./
  drwxr-xr-x 5 root root 4096 Aug 23 02:39 ../
  -rw-r--r-- 1 root root 8560 Aug 17 06:05 client_plugin.h
  -rw-r--r-- 1 root root 3793 Aug 17 06:05 plugin_auth.h
  -rw-r--r-- 1 root root 3873 Aug 17 06:05 plugin_auth_common.h
  root@host [~]# ls -al  /usr/include/mysql/server/
  total 656
  drwxr-xr-x 4 root root   4096 Aug 23 02:39 ./
  drwxr-xr-x 5 root root   4096 Aug 23 02:39 ../
  -rw-r--r-- 1 root root   4507 Aug 17 06:05 big_endian.h
  -rw-r--r-- 1 root root   5196 Aug 17 06:05 byte_order_generic.h
  -rw-r--r-- 1 root root   4239 Aug 17 06:05 byte_order_generic_x86.h
  -rw-r--r-- 1 root root   4089 Aug 17 06:05 byte_order_generic_x86_64.h
  -rw-r--r-- 1 root root   4667 Aug 17 06:05 decimal.h
  -rw-r--r-- 1 root root   4363 Aug 17 06:05 errmsg.h
  -rw-r--r-- 1 root root   4441 Aug 17 06:05 handler_ername.h
  -rw-r--r-- 1 root root    758 Aug 17 06:05 handler_state.h
  -rw-r--r-- 1 root root  13184 Aug 17 06:05 json_lib.h
  -rw-r--r-- 1 root root   8827 Aug 17 06:05 keycache.h
  -rw-r--r-- 1 root root   3574 Aug 17 06:05 little_endian.h
  -rw-r--r-- 1 root root  47238 Aug 17 06:05 m_ctype.h
  -rw-r--r-- 1 root root   7745 Aug 17 06:05 m_string.h
  -rw-r--r-- 1 root root   7838 Aug 17 06:05 ma_dyncol.h
  -rw-r--r-- 1 root root   1944 Aug 17 06:05 my_alloc.h
  -rw-r--r-- 1 root root   2208 Aug 17 06:05 my_attribute.h
  -rw-r--r-- 1 root root   1980 Aug 17 06:05 my_byteorder.h
  -rw-r--r-- 1 root root   4236 Aug 17 06:05 my_compiler.h
  -rw-r--r-- 1 root root  14716 Aug 17 06:12 my_config.h
  -rw-r--r-- 1 root root   8543 Aug 17 06:05 my_dbug.h
  -rw-r--r-- 1 root root   2075 Aug 17 06:05 my_decimal_limits.h
  -rw-r--r-- 1 root root   3900 Aug 17 06:05 my_dir.h
  -rw-r--r-- 1 root root   5578 Aug 17 06:05 my_getopt.h
  -rw-r--r-- 1 root root  34520 Aug 17 06:05 my_global.h
  -rw-r--r-- 1 root root   1506 Aug 17 06:05 my_list.h
  -rw-r--r-- 1 root root   2104 Aug 17 06:05 my_net.h
  -rw-r--r-- 1 root root  27489 Aug 17 06:05 my_pthread.h
  -rw-r--r-- 1 root root  42655 Aug 17 06:05 my_sys.h
  -rw-r--r-- 1 root root   1982 Aug 17 06:05 my_valgrind.h
  -rw-r--r-- 1 root root   2832 Aug 17 06:05 my_xml.h
  drwxr-xr-x 3 root root   4096 Aug 23 02:39 mysql/
  -rw-r--r-- 1 root root  39711 Aug 17 06:05 mysql.h
  -rw-r--r-- 1 root root  28765 Aug 17 06:05 mysql_com.h
  -rw-r--r-- 1 root root   1313 Aug 17 06:05 mysql_com_server.h
  -rw-r--r-- 1 root root   1167 Aug 17 06:05 mysql_embed.h
  -rw-r--r-- 1 root root   2420 Aug 17 06:05 mysql_time.h
  -rw-r--r-- 1 root root   1021 Aug 17 06:12 mysql_version.h
  -rw-r--r-- 1 root root 117146 Aug 17 06:15 mysqld_ername.h
  -rw-r--r-- 1 root root  43551 Aug 17 06:15 mysqld_error.h
  -rw-r--r-- 1 root root   1105 Aug 17 06:05 pack.h
  drwxr-xr-x 3 root root  12288 Aug 23 02:39 private/
  -rw-r--r-- 1 root root   5508 Aug 17 06:05 sql_common.h
  -rw-r--r-- 1 root root  14602 Aug 17 06:15 sql_state.h
  -rw-r--r-- 1 root root   1350 Aug 17 06:05 sslopt-case.h
  -rw-r--r-- 1 root root   2534 Aug 17 06:05 sslopt-longopts.h
  -rw-r--r-- 1 root root   1367 Aug 17 06:05 sslopt-vars.h
  -rw-r--r-- 1 root root   2463 Aug 17 06:05 typelib.h
  </code></pre>