You may run into the error “Subprocess exited with error when installing mysqlclient” when trying to install the mysqlclient for your application using pip.
This guide will take you how to resolve the issue.
Requirements.
Root access to the server.
The error occurs due to missing build dependencies required to build wheel for mysqlclient.

The error is clearly captured from screen when running pip install mysqlclient

Install the missing dependencies
Run the command
yum install python3-devel mysql-devel pkgconfig

Try again now to install mysqlclient
pip install mysqlclient

All Done!
You can now proceed with your app configurations!