1. First, you need to make sure that you have the PIP installed. In Python2.7 's installation package, both easy_install.py and PIP are installed by default. Can be confirmed in the Python installation directory, if there is a Pip, Pip27, Pip in the \python27\scripts, it means that PIP has been installed.
2. Then, in the DOC environment, in the directory where Pip is located, execute Pip.exe, you can see the operation that PIP can take, as follows:
3, install MYSQLDB before installing wheel, execute PIP Install wheel command to install
4, download MYSQL_PYTHON-1.2.5-CP27-NONE-WIN32.WHL installation package, before downloading to determine whether you install Python is 32-bit or 64-bit, if it is 32-bit download 32-bit, if 64-bit download 64-bit. Download here: http://www.lfd.uci.edu/~gohlke/pythonlibs/
5, then, execute pip install MYSQL_PYTHON-1.2.5-CP27-NONE-WIN32.WHL, if it is installed 64-bit, you need to change this file name to "Mysql_ PYTHON-1.2.5-CP27-NONE-ANY.WHL ".
can use
Import pip
Print (pip.pep425tags.get_supported ())
Check the format of the WHL supported by your computer.
Reprinted from:
Http://www.cnblogs.com/gbx-bo/p/5993190.html
Use PIP to install MYSQLDB under Windows7 environment