[Fixed]-Trouble installing mysql python, mysqldb module not found in django

1👍

sometimes pip install mysqlclient command doesn’t work
so follow these steps:

1) search unofficial python binaries or
go to https://www.lfd.uci.edu/~gohlke/pythonlibs/
and search(ctrl+f)on that page for mysqlclient

2) check your python version on machine
and download the whl file appropriate for your downloaded python version
like
type python in command prompt
and you will get your python version

>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

this is python 3.7.3 version and works on 32 bit    

so the whl file will be mysqlclient-1.4.4-cp37-cp37m-win32.whl
python 3.7.3 = cp37 and 32 bit is win32

3) download that file and type following code in your environment or where you downloaded the whl file
>pip install mysqlclient-1.4.4-cp37-cp37m-win32.whl

hope this will work

0👍

Head over to Mysql and install Connector. This should fix your problem.

Leave a comment