Saturday, November 27, 2010

Time to update my Python on windows

It's time again to play with my Python on my Windows vm and I thought it was high time I updated it since it was running ver. 2.5. First came the easy part, replacing Python itself. I just downloaded and changed the path for python in window's environment variable.

I ran 'easy_install mysql-python' thinking on other tasks ahead. Hmm .. command now found, fudge around with the paths and found that I had to install the setuptools for windows. Installed it, changed the path to point at PATH;C:\Python27\Scripts and boom now my Python has easy_install. Little did I know more fun lies in wait ...

First in trying out 'easy_install mysql-python' I ran into an error saying "error: Setup script exited with error: Unable to find vcvarsall.bat". Looks like my install was still lacking something. After some digging around, it seems that, that error is equivalent of gcc not found on Linux, so I was off to install MingGW.

Install that, downloaded the sources for MySQLdb from They used to provide binaries for MySQLdb but it seems now no more. I ran into another error! Google lead me to this answer: Good point. So I finally found my answer here... Thanks codegood or Ioannis Lalopoulos, for saving a few more of those pili on my scalp! Now ... to find that win32com!

1 comment:

Anonymous said...

It's the same thing i too experienced. I tried to install TurboGears 2 and the dependencies almost killed me. vcvarshall.bat was the main culprit. After fighting for the whole day found some solutions at the end.
Before you go wild on Win32 extensions, try this link of what I have captured:

may be of some help to you.
For a new comer python seems formidable in the way finding the right package & install tools(least to say even web frameworks). What we need is a good documentation.

For example still there is no documentation in python for a SOAP client & server. If you search pypi (, what you get is a list of 40+ packages. Which one i will choose? And how much time I have to invest in pros & cons of everything.

Compare this with php world. Run -enable SOAP and you are done.

Still, I love python.