From 92d323ccb5239e3f04b6cb749521fffa71318923 Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Wed, 29 Jun 2016 01:31:27 +0200 Subject: [PATCH] Added package names to 'Error loading MySQLdb module' error. --- django/db/backends/mysql/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 761e5faaff4..524e90d6eb7 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -25,7 +25,10 @@ try: import MySQLdb as Database except ImportError as e: from django.core.exceptions import ImproperlyConfigured - raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) + raise ImproperlyConfigured( + 'Error loading MySQLdb module: %s.\n' + 'Did you install mysqlclient or MySQL-python?' % e + ) from MySQLdb.constants import CLIENT, FIELD_TYPE # isort:skip from MySQLdb.converters import Thing2Literal, conversions # isort:skip