-2

On my windows-7, when I wanted to build a C-extension using "distutils", it failed with "unable to find vscvarsall.bat". A little bit web search told me that I may need Visual Studio 2008. I confirmed that indeed, my python2.7 was compiled by Visual Studio 2008 (MSC v. 1500). Now I have 2 questions:

  1. Do I really need to install VS 2008 to get my C-extension built by "distutils"?
  2. If this is true, since VS is an expensive commercial package, does this limit python application development? Why has python-windows not been compiled by free compiler, eg MINGW?
Hailiang Zhang
  • 17,604
  • 23
  • 71
  • 117

1 Answers1

1

Since you have a C-extension you will need to compile all C Extensions to be used by your python installation using the same version of the C compiler used to build the python executable from the source. Hence, the answer to your first question is yes - you will need VS 2008 to build the C-extension.

About the second query - please refer here to understand how to setup MinGW with Python 2.7.2. This example uses Windows XP, however I guess it should work on Win 7 as well provided the correct paths have been provided.

Hope this helps

Prahalad Deshpande
  • 4,709
  • 1
  • 20
  • 22