9

To put this question a different way, what version of Visual C++ was each official build of Python from python.org of Python built with, and what versions of MinGW are compatible with those versions of Visual C++?

Is this information readily available on some web site?

Glyph
  • 31,152
  • 11
  • 87
  • 129
  • The ABIs need to be compatible. Other than that, I have no answer for this. – Ignacio Vazquez-Abrams Aug 19 '12 at 18:13
  • 3
    See [Windows Python Version and VC++ Redistributable Version](http://stackoverflow.com/q/9047072/95735) and [What version of Visual Studio is this python compiled with?](http://stackoverflow.com/q/2676763/95735) – Piotr Dobrogost Aug 19 '12 at 19:59

3 Answers3

9

The file PCbuild\readme.txt in the source distribution of each version of Python includes the version of Visual Studio used to make the binaries.

Python 2.6, 2.7, 3.1, and 3.2 were all compiled with VS 2008. Python 3.3 and 3.4 are compiled with VS 2010.

I'm not sure about MinGW compatibility.

If you are looking for command line compilers, Microsoft has released two different SDKs for Windows 7 that include the command line compilers. The first SDK (for .NET 3.5) includes the VS 2008 compilers. The second SDK (for .NET 4.0) includes the VS 2010 compilers.

Update: The file PCbuild\readme.txt in the source distribution of each version of Python includes the version of Visual Studio used to make the binaries.

Glyph
  • 31,152
  • 11
  • 87
  • 129
casevh
  • 11,093
  • 1
  • 24
  • 35
  • 1
    What about 2.5? And is there some public resource with this information to refer to, so that I can learn about it when new Python versions are released? – Glyph Aug 19 '12 at 20:41
  • 3
    When Python 3.3 comes out, what version will it use? And Python 3.4? Where do I go to *look* for this information? – Glyph Dec 09 '12 at 05:42
  • 6
    The file PCbuild\readme.txt in the source distribution of each version of Python includes the version of Visual Studio used to make the binaries. – casevh Dec 09 '12 at 10:27
  • You should make the above part of your answer instead of a comment. – Piotr Dobrogost Apr 01 '13 at 19:39
3

Presumably, you're talking about a requirement that Python extensions be built to link dynamically with the same C runtime library that the Python instance does. It should first be noted that this depends on how the instance was built, i.e., if you build Python yourself from the source code it is the compiler version you use for the build, not the version of Python, that determines the runtime library being used.

If you want to know the runtime library versions for the official binary releases, you can work this out yourself using your favorite DLL dependency tool, e.g., Dependency Walker, or by looking to see which runtime library redistributable is contained in the installer.

Based on my very brief research, I believe you can use the latest version of MinGW with any of these runtime libraries. By default it uses msvcrt.dll, the C runtime built into Windows, but it appears to support using VC++ runtimes instead.

Harry Johnston
  • 35,639
  • 6
  • 68
  • 158
  • 1
    In Visual Studio's case, it's not just the compiler version you use to build the Python interpreter, but also whether it's a Debug or Release build because each uses a different runtime library -- and any extensions you build will need to match in that respect as well. – martineau Feb 20 '13 at 23:05
2

If anyone is still interested in this in 2020: I've found this (updated) page that lists the Visual C++ compiler versions (and Visual Studio versions that include them) used for each CPython version:

https://wiki.python.org/moin/WindowsCompilers

GennaroC
  • 31
  • 2
  • Thanks! I do indeed still care about this; thanks for making an account to answer this :) – Glyph Jun 08 '20 at 04:55