No module named MySQLdb

146 views
Skip to first unread message

fossildoc

unread,
Sep 20, 2016, 10:41:31 AM9/20/16
to Django users
I am a newbie to Django. I am running Django 1.10.1, Python 3.5.2, and MySQL server 5.7.15. When I run migrate, I get the message "No module named MySQLdb". There are various posts which say that MySQLdb is not supported by Python 3, and there are a couple of posts which offer solutions, but only for older versions of Django. Any help, please.

Carlos Andre

unread,
Sep 20, 2016, 11:12:42 AM9/20/16
to django...@googlegroups.com
1º install setuptools;
2º install PyMySQL;




2016-09-20 11:01 GMT-03:00 fossildoc <doctor...@gmail.com>:
I am a newbie to Django. I am running Django 1.10.1, Python 3.5.2, and MySQL server 5.7.15. When I run migrate, I get the message "No module named MySQLdb". There are various posts which say that MySQLdb is not supported by Python 3, and there are a couple of posts which offer solutions, but only for older versions of Django. Any help, please.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b0a88c18-faa9-4d0e-ac7b-1a8be1fb8070%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alessandro Madruga Correia

unread,
Sep 20, 2016, 11:18:08 AM9/20/16
to django...@googlegroups.com
pip install MySQL-python


For more options, visit https://groups.google.com/d/optout.



--
  ,= ,-_-. =.   [<o>] Alessandro Madruga Correia
 ((_/)o o(\_))  [http://counter.li.org]       Debian User# 342751 
   `-'(. .)`-'    "O fanatismo é a única forma de força de vontade 
       \_/        acessível aos fracos." (Friedrich Nietzsche)

Tim Graham

unread,
Sep 20, 2016, 12:00:08 PM9/20/16
to Django users
I'm not sure if PyMySQL is compatible, but it's not tested by the Django team.

I'd use mysqlclient as documented:
https://docs.djangoproject.com/en/stable/ref/databases/#mysql-db-api-drivers


On Tuesday, September 20, 2016 at 11:18:08 AM UTC-4, Alessandro Madruga wrote:
pip install MySQL-python

On Tue, Sep 20, 2016 at 12:12 PM, Carlos Andre <euca...@gmail.com> wrote:
1º install setuptools;
2º install PyMySQL;



2016-09-20 11:01 GMT-03:00 fossildoc <doctor...@gmail.com>:
I am a newbie to Django. I am running Django 1.10.1, Python 3.5.2, and MySQL server 5.7.15. When I run migrate, I get the message "No module named MySQLdb". There are various posts which say that MySQLdb is not supported by Python 3, and there are a couple of posts which offer solutions, but only for older versions of Django. Any help, please.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages