classification
Title: vs version for win32 compilation of extension modules is undocumented.
Type: enhancement Stage:
Components: Documentation Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: brian.curtin, docs@python, jkloth, r.david.murray, tfogal
Priority: normal Keywords:

Created on 2010-10-23 01:02 by tfogal, last changed 2019-04-26 19:01 by BreamoreBoy.

Messages (4)
msg119410 - (view) Author: Tom Fogal (tfogal) Date: 2010-10-23 01:02
I have recently attempted to install a couple third party packages (zope.interface and dulwech, FWIW) and encountered great difficulties.  In particular, the setup complained that it could not find "vcvarsall.bat".  Even running these setup scripts from a VC++ 2010 Express command shell gave the error.

Through browsing this bug database, specifically bugs 5235, 7511, and 2513, I have determined that the 'official' python.org binary is built with either VS 2008 or VS 2008 Express, I'm not sure which yet, but it does not really matter.

Setting DISTUTILS_USE_SDK and MSSdk to 1 and manually running the script, as suggested in one of the bug reports, does get by the issue of finding "vcvarsall.bat".  As one might guess, this only results in a confusing error message during compilation (c1010070, "Failed to load and parse the manifest"), presumably because vs2008 binaries are not compatible with vs2010 output files.

This bug isn't so much about the incompatibility as to the difficulty in diagnosing the issue.  It seems that trying to figure out which VS was used to compile a particular version of python is stored within a puzzle of bug reports.  Could this be listed on the download page, e.g.:

   http://www.python.org/download/releases/2.6.6/

?  Of course, it would be ideal if multiple binaries existed, so that someone in my position could say, "Oh, I don't even have 2008 installed; I should go with the 2010-compiled version", or vice-versa.  In the absence of that, simply knowing which version I'll need for extension modules is nice.
msg119412 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-10-23 02:44
If I understand correctly (I'm not a windows user or developer myself), knowing the bits necessary to compile extension modules is not something very many people need to know.  If an extension module supports Windows, there will generally be an installer package containing the binaries available.  If there isn't, chances are the extension module doesn't support Windows.

That said, improvements in the documentation is rarely a bad idea ;)
msg119413 - (view) Author: Jeremy Kloth (jkloth) * Date: 2010-10-23 03:01
A quick look with Dependency Walker gives me the following:

Python 2.4,2.5 -- MSVC .NET 2003 (7.1)
Python 2.6,2.7,3.0,3.1 -- MSVC 2008 (9.0)

Note these are only for the official python.org builds.  Each version can also be built using other MSVC versions.  To the best of my knowledge Python 3.2 will also be built using MSVC 2008 as 2010 support hasn't been discussed yet.
msg222773 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-11 18:15
There's a table here https://docs.python.org/X/using/windows.html#compiling-python-on-windows which shows what versions you need, where X can be 2 or 3.
History
Date User Action Args
2019-04-26 19:01:03BreamoreBoysetnosy: - BreamoreBoy
2014-07-11 18:15:42BreamoreBoysetnosy: + BreamoreBoy

messages: + msg222773
versions: + Python 3.4, Python 3.5, - Python 3.1, Python 3.2, Python 3.3
2011-04-04 17:26:26brian.curtinsetnosy: + brian.curtin
2011-03-09 03:00:19terry.reedysetnosy: jkloth, tfogal, r.david.murray, docs@python
versions: + Python 3.3
2010-10-23 03:01:33jklothsetmessages: + msg119413
2010-10-23 02:44:46r.david.murraysetassignee: docs@python
type: compile error -> enhancement
components: + Documentation, - Extension Modules
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
nosy: + r.david.murray, docs@python

messages: + msg119412
2010-10-23 01:15:45jklothsetnosy: + jkloth
2010-10-23 01:02:23tfogalcreate