1

I'm trying to build out a web application using Django and Python3.4 through Visual Studio 2013 Community Edition on a Windows 10 machine. I want to use MySQL as the database, but I'm unable to connect to the DB using python3.4 -- it comes up with:

No Module named MySQlDB error

Can someone please tell me how I can fix this. I do not want to downgrade my python version.

Matt Seymour
  • 8,880
  • 7
  • 60
  • 101
ekartik
  • 39
  • 2
  • http://stackoverflow.com/questions/454854/no-module-named-mysqldb – Lucas Sep 16 '15 at 14:47
  • With Python 3.4, try using mysqlclient. See http://stackoverflow.com/questions/32401793/just-cant-get-mysql-working-with-python-django/32402672#32402672 – Alasdair Sep 16 '15 at 14:54
  • It just downloaded a mysqlclient folder.. how do I go about installing this ? Sorry, I'm new to this.. – ekartik Sep 16 '15 at 15:46
  • The easiest way to install is using pip: `pip install mysqlclient`. It will download the package and install. – Alasdair Sep 16 '15 at 18:10
  • That actually worked !! Thank you so much!!! – ekartik Sep 17 '15 at 02:41
  • Ok.. I seem to have encountered a new problem... So I was able to connect to the Database through an existing project, but again got the 'No Module called MySqlDb' error when I created a new project and tried to connect from it.. What exactly is going on ? – ekartik Sep 17 '15 at 04:01

0 Answers0