Mysql
 sql >> Base de données >  >> RDS >> Mysql

problème d'installation de mysql python, module mysqldb introuvable dans django

parfois pip install mysqlclient La commande ne fonctionne pas, alors suivez ces étapes :

1) recherchez des binaires python non officiels ou rendez-vous sur https://www.lfd. uci.edu/~gohlke/pythonlibs/ et recherchez (ctrl + f) sur cette page mysqlclient

2) vérifiez votre version de python sur la machine et téléchargez le whl fichier approprié pour votre version de python téléchargée comme tapez python dans l'invite de commande et vous obtiendrez votre version de python

>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) téléchargez ce fichier et tapez le code suivant dans votre environnement ou là où vous avez téléchargé le fichier whl>pip install mysqlclient-1.4.4-cp37-cp37m-win32.whl

j'espère que ça marchera