Solve vcvarsall.bat Python Windows installation


When installing python modules in Windows 8, this errors is very common and very hard to find solution. I spent 2 hours only to solve this issues

1
Unable to find vcvarsall.bat

The solution is quite straight-forward:

1. Install Visual Studio 2008
VC Setup http://go.microsoft.com/?linkid=7729279
VS 2008 : http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso

2. Install Microsoft SDK
http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en

3. After installing, setup your global environment variables:

1
VS90COMNTOOLS = J:\Program Files (x86)\Microsoft Visual Studio 9.0\VC

Also, add into PATH

1
J:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;J:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin

If your OS Path is C:\ then just replace J: with C:.

Then all your problem should gone. Btw, there some modules that required header files that not covered by Windows:
https://pypi.python.org/pypi/python-ldap/

Reference:
http://springflex.blogspot.com/2014/02/how-to-fix-valueerror-when-trying-to.html

Install Python Header (NO NEED)
http://www.microsoft.com/en-us/download/details.aspx?id=44266


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.