Install MySQL-python using python-pip in Windows without errors

Assuming you have already installed python 2.7 and python-pip in your windows environment (windows 7 or later). Here are how you can install the MySQL driver painlessly:


1. Download and install:

Microsoft Visual C++ Compiler for Python 2.7

Install this package will get rid of the error: Unable to find vcvarsall.bat.

2. Install MySQL-python using wheel:

+ Install wheel using pip:

pip install wheel

+ Download the whl file: http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python

+ Install MySQL-python with the downloaded whl file:

pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl