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
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
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:
Post a Comment