Exception has occurred: ModuleNotFoundError No module named 'mysql' code example Example: ImportError: No module named mysql.connector sudo pip install mysql-connector-python