title: Unable to install mysqlclient with pip on ubuntu
body: <p>I'm trying to install mysqlclient on Ubuntu 20.04LTS, the main error is: mysql_config not found.</p>
  <p>Whole Error:</p>
  <pre><code>$ pip3 install mysqlclient==2.0.3
  Defaulting to user installation because normal site-packages is not writeable
  Collecting mysqlclient==2.0.3
    Using cached mysqlclient-2.0.3.tar.gz (88 kB)
    Preparing metadata (setup.py) ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup.py'&quot;'&quot;'; _file__='&quot;'&quot;'/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file_) if os.path.exists(_file_) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, _file_, '&quot;'&quot;'exec'&quot;'&quot;'))' egg_info --egg-base /tmp/pip-pip-egg-info-ehrlbbbl
         cwd: /tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/
    Complete output (15 lines):
    /bin/sh: 1: mysql_config: not found
    /bin/sh: 1: mariadb_config: not found
    /bin/sh: 1: mysql_config: not found
    Traceback (most recent call last):
      File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
      File &quot;/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup.py&quot;, line 15, in &lt;module&gt;
        metadata, options = get_config()
      File &quot;/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup_posix.py&quot;, line 70, in get_config
        libs = mysql_config(&quot;libs&quot;)
      File &quot;/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup_posix.py&quot;, line 31, in mysql_config
        raise OSError(&quot;{} not found&quot;.format(_mysql_config_path))
    OSError: mysql_config not found
    mysql_config --version
    mariadb_config --version
    mysql_config --libs
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz#sha256=f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432 (from https://pypi.org/simple/mysqlclient/) (requires-python:&gt;=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Could not find a version that satisfies the requirement mysqlclient==2.0.3 (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc1, 2.1.0)
  ERROR: No matching distribution found for mysqlclient==2.0.3
  </code></pre>
  <p>(when trying to pip3 install mysqlclient, the same error apears, but every version tries to install)</p>