I'm working with the latest version of Python and Django as of the date of this question and I cannot find a connector that will work for MySQL which supports Python 3.5. Does anybody have a solution to this problem? I'm running on a Windows platform.
When I try to download the mysqlclient from here here, I'm running Python 3.5.1 32 on Windows 8.1. I download the wheel, I attempt to install the wheel file using pip, I get the error that
mysqlclient-1.3.7-cp27-none-win32.whl is not a supported wheel on this platform.
Apparently this wheel is supposed to work on Python 3.5.
To make sure I'm not having a problem elsewhere, since I'm new to this whl format, I downloaded another package (BeautifulSoup4) and confirmed the installation of that wheel file is working, so it appears to be a problem with my operating system and the wheel file for mysqlclient.
As cgohlke said, mysqlclient can not currently be compiled on Python 3.5 for Windows because the MySQL Connector/C is not yet compatible with the Visual Studio 2015 compiler required by Python 3.5.
Follow the related GitHub issue : mysqlclient-python - Not working with python 3.5 to be aware when this bug will be fixed.
When this issue will be fixed, mysqlclient should work.
Temporary solution with unofficial Windows binaries : mysqlclient-1.3.7
From Django 1.9 documentation :
Django supports MySQL 5.5 and higher.
Django requires mysqlclient 1.3.3 or later. Note that Python 3.2 is not supported. Except for the Python 3.3+ support, mysqlclient should mostly behave the same as MySQLDB.
From mysqlclient 1.3.7 package index :
mysqlclient is a fork of MySQL-python. It adds Python 3.3~ support and merges some pull requests.
MySQL-4.1 through 5.5 and Python-2.7, 3.3-3.5 are currently supported. PyPy is supported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With