Tuesday, February 21, 2017

How to install MYSQLDb for Python 3.6 and MYSQL 5.7.12

At present there are very few options for using Python 3* version with MYSQL
One of such option is to use
https://pypi.python.org/pypi/mysqlclient
- Django's, C based , most compatible and recommended library.
Go to above site and download required .whl file from the site as per your O/S need and run the same using following command
image_4
C:\Software>pip install mysqlclient-1.3.10-cp36-cp36m-win32.whl
Processing c:\software\mysqlclient-1.3.10-cp36-cp36m-win32.whl
Installing collected packages: mysqlclient
Successfully installed mysqlclient-1.3.10
Now you can use below import in your files
import MySQLdb

No comments: