97

I am trying to find out the version of Visual Studio that is used to compile the Python on my computer

It says

Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32

What I do not understand is this MSC V.1500 designation. Does it mean it is compiled with Visual Studio 2005? I cannot find this information on http://python.org.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
leon
  • 4,931
  • 7
  • 39
  • 37
  • why would python be absolutely compiled with visual studio ? There are other compilers out there like gcc, etc... – dm76 Apr 20 '10 at 16:21
  • 7
    @David Michel, The official distributions of Python are all compiled with Visual Studio. He obviously didn't compile it himself (or he would know the answer). – Daniel Stutzbach Apr 20 '10 at 16:24
  • 4
    Clearly, my version is compiled with MSC. I am sure the python on my linux is compiled with gcc. I need the compiler version because I have to compile python extension. – leon Apr 20 '10 at 16:24
  • 1
    Does the release type, ie `release` or `debug` matter too? And how does one go about finding that out? – Dilum Ranatunga Sep 27 '12 at 17:12
  • *I need the compiler version because I have to compile python extension.* See [What version of Visual Studio and/or MinGW do I need to build extension modules for a given version of Python?](http://stackoverflow.com/q/12028762/95735) – Piotr Dobrogost Apr 01 '13 at 19:24
  • How do you get that version string? All `python --version` is saying for me is `Python 2.7.8`- – poizan42 Dec 12 '14 at 02:12
  • Is there a clever way to get the information in Python in code? – Colonel Panic Jul 11 '15 at 21:38
  • Pretty much necro @poizan42, but I was looking for it and found out it with use of --help: `python -V -V' or 'python --version --version': -V : print the Python version number and exit (also --version) when given twice, print more information about the build – R2RT Oct 22 '17 at 13:40

2 Answers2

186
Visual C++ version _MSC_VER
Visual C++ 4.x 1000
Visual C++ 5 1100
Visual C++ 6 1200
Visual C++ .NET 1300
Visual C++ .NET 2003 1310
Visual C++ 2005 (8.0) 1400
Visual C++ 2008 (9.0) 1500
Visual C++ 2010 (10.0) 1600
Visual C++ 2012 (11.0) 1700
Visual C++ 2013 (12.0) 1800
Visual C++ 2015 (14.0) 1900
Visual C++ 2017 (15.0) 1910
Visual C++ 2017 (15.3) 1911
Visual C++ 2017 (15.5) 1912
Visual C++ 2017 (15.6) 1913
Visual C++ 2017 (15.7) 1914
Visual C++ 2017 (15.8) 1915
Visual C++ 2017 (15.9) 1916
Visual C++ 2019 RTW (16.0) 1920
Visual C++ 2019 (16.1) 1921
Visual C++ 2019 (16.2) 1922
Visual C++ 2019 (16.3) 1923
Visual C++ 2019 (16.4) 1924
Visual C++ 2019 (16.5) 1925
Visual C++ 2019 (16.6) 1926
Visual C++ 2019 (16.7) 1927
Visual C++ 2019 (16.8) 1928
Visual C++ 2019 (16.9) 1928
Visual C++ 2019 (16.10) 1929
Visual C++ 2019 (16.11) 1929
Visual Studio 2022 RTW (17.0) 1930

Source: the documentation for the _MSC_VER predefined macro

Orhan Cinar
  • 8,403
  • 2
  • 34
  • 48
13

MSC v.1500 appears to be Visual C++ 2008 according to this thread on the OpenCobol forums (of all places).

The MSDN page on Predefined Macros indicates 1500 to be the result of the _MSC_VER macro.

This other forum post mentions that

(For reference, Visual Studio 2003 has _MSC_VER = 1310; Visual Studio 2005 has _MSC_VER = 1400; Visual Studio 2008 has _MSC_VER = 1500.)

The above MSDN link said that 1600 indicates VS2010.

Strangely, I wasn't able to find that info about the earlier _MSC_VER values on MSDN.

Mark Rushakoff
  • 249,864
  • 45
  • 407
  • 398
  • 4
    Not the first day that M$ makes programmer life harder. This is why we are a better man now. – leon Apr 20 '10 at 21:32
  • 1
    Hi. `python 3.7` uses `MSC v.1912 64 bit (AMD64)`. what version is this?? can you please update! – Khalil Al Hooti Nov 18 '18 at 00:28
  • @KhalilAlHooti, I'm not completely certain, but v.1912 is probably Visual Studio 2018. Perhaps download the community edition and double check. – Ben Dec 08 '18 at 05:41
  • 1
    @KhalilAlHooti, `1912` is __Visual C++ 2017 (15.5)__. See the [other answer](https://stackoverflow.com/a/2676904/12892). – Cristian Ciupitu Feb 13 '19 at 02:53