I'm currently setting-up an existing Django project using a virtual environment with Python3.9 on my CentOS system.
When I ran the pip install requirements.txt command it gets stuck on installing mysqlclient and shows an error: OSError: mysql_config not found.
    ERROR: Command errored out with exit status 1:
    command: /home/test/Projects/env/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-of5a4s4j/mysqlclient_d1bfd0ee1acb4132874cf63635277f3e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-of5a4s4j/mysqlclient_d1bfd0ee1acb4132874cf63635277f3e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-0xsnkncd
        cwd: /tmp/pip-install-of5a4s4j/mysqlclient_d1bfd0ee1acb4132874cf63635277f3e/
    Complete output (10 lines):
    /bin/sh: line 1: mysql_config: command not found
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-of5a4s4j/mysqlclient_d1bfd0ee1acb4132874cf63635277f3e/setup.py", line 17, in <module>
        metadata, options = get_config()
    File "/tmp/pip-install-of5a4s4j/mysqlclient_d1bfd0ee1acb4132874cf63635277f3e/setup_posix.py", line 47, in get_config
        libs = mysql_config("libs_r")
    File "/tmp/pip-install-of5a4s4j/mysqlclient_d1bfd0ee1acb4132874cf63635277f3e/setup_posix.py", line 29, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    OSError: mysql_config not found
I also tried installing the required prerequisites for as mentioned in https://pypi.org/project/mysqlclient/
dnf install python3-devel command and other requirements such as gcc works fine but it shows an Error for
dnf install mysql-devel
The error shows:
No match for argument: mysql-devel
Error: Unable to find a match: mysql-devel 
So far, I tried the following commands:
dnf install mysql-devel
dnf install mysql-community-devel
dnf install mariadb-devel
dnf install libmysqlclient-dev
dnf install libmariadbclient-dev
But no luck.
dnf install mysql-server is already installed
Just for the record, I have tried all the answers from other posts but almost all of their answers were
  yum install python-devel mysql-devel
which was not working for me.
