Python MySQLdb error Mac OS

Clash Royale CLAN TAG#URR8PPPPython MySQLdb error Mac OS
These are my header files:
import face_recognition.api as face_recognition
from multiprocessing
import Pool
from multiprocessing
import cpu_count
import scipy.misc
import warnings
import re
import click
import MySQLdb
import os
import datetime
import logging
import sys
import subprocess
global curr_date
global course_id
When I run the python script, I get this error:
Traceback (most recent call last):
File "/Applications/XAMPP/xamppfiles/htdocs/akriti/veri_test1.py", line 21, in <module>
import MySQLdb
File "/Users/akriti/Library/Python/2.7/lib/python/site-packages/MySQLdb/__init__.py", line 18, in <module>
import _mysql
ImportError: dlopen(/Users/akriti/Library/Python/2.7/lib/python/site-packages/_mysql.so, 2): Library not loaded: @rpath/libmysqlclient.21.dylib
Referenced from: /Users/akriti/Library/Python/2.7/lib/python/site-packages/_mysql.so
Reason: image not found
I have tried a lot of things given on the internet, but nothing seems to work. I use Mac OS High Sierra.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.