0

I have a Python Django project.

The following is installed:

Django settings has the following database configuration:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'the_name',
        'USER': 'the_user',
        'PASSWORD': 'the_password',
        'HOST': 'the_host',
        'PORT': '3306',
    }
}

When I run:

python manage.py makemigrations

I get the following error:

raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module:

As far as I understand it is a problem with the mysqlclient fork (which is essentially the MySQLdb module).

Questions:

  • What could be the problems with the above?
  • Are there any suggestions on how to make Python 3.4, Django 1.8 and MySQL work together? (i.e. there is poor support for MySQL in Django 1.8 in my opinion)

Thank you.

Aivoric
  • 838
  • 2
  • 10
  • 24
  • And did you try pip install mysql-python ? – amureki Jul 31 '15 at 15:05
  • No support for Python 3.4 (https://pypi.python.org/pypi/MySQL-python/1.2.5) and here is a thread about it: http://stackoverflow.com/questions/14087598/python-3-3-importerror-no-module-named-configparser – Aivoric Jul 31 '15 at 15:06
  • I have worked with python 3.4 and mysqlclient with django 1.8, but i did'nt face such problem.I encountered this error when I was using MySQL-python. – gaurav_kamble Jul 31 '15 at 15:12
  • For information regarding mysql drivers you can read from django docs:https://docs.djangoproject.com/en/1.8/ref/databases/#mysql-db-api-drivers – gaurav_kamble Jul 31 '15 at 15:27
  • @gaurav_kamble yes of course I read that inside out, but the instructions there don't lead to a working solution – Aivoric Aug 01 '15 at 09:49
  • if your problem is still not solved then you can look on PyMySQL : https://github.com/PyMySQL/PyMySQL and this question:http://stackoverflow.com/questions/7224807/what-is-pymysql-and-how-does-it-differ-from-mysqldb-can-it-affect-django-deploy – gaurav_kamble Aug 01 '15 at 12:38

0 Answers0