Installing MySQL-python on a Windows virtualenv

This one is more for my own reference when I inevitably forget how to do this: I needed to install the mysql-python connector into a virtualenv on my Windows system but could not get it to do a pip or easy_install install for a variety of errors: a missing header file and a missing compiler batch file amongst others. I solved it by using a pre-compiled package from this excellent list of pre-compiled Python Windows packages¬†and then instructing easy_install to install it (which I didn’t realise was possible):

easy_install MySQL-python-1.2.4.win-amd64-py2.6.exe

Voila.

Leave a Comment

Filed under code, python

Leave a Reply

Your email address will not be published. Required fields are marked *