Frage

This question concerns: django 1.5.1 with python 3.3 and mysql 5.6.12

Wanting to get Mysql running with Django. Had everything configured, even Database exists with user-pemissions. Got some error when trying syncdb:

ImportError: No module named 'MySQLdb'

There is obviously the Mysql-Lib for python missing. Downloaded the master-edition from petehunt/PyMySQL. Tried "python setup.py install" . Says:

ImportError: No module named 'constants'

Downloaded another version. A tarball from here. Run "python setup.py install". Seems to work, tried to run the syncdb command "python manage.py syncdb". Still:

ImportError: No module named 'MySQLdb'

Any suggestions what to do now? Thanks in advance.

War es hilfreich?

Lösung

mysqlclient is the recommended mysql driver for python 3

You can install it via pip:

pip install mysqlclient

Andere Tipps

Well I solve it. Downgraded to 2.7.x , so that i could use this. Seems to me there should exist a big red warning for using django with python 3.x and Windows 7.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top