-
Notifications
You must be signed in to change notification settings - Fork 423
Windows Compilers
immki edited this page Nov 25, 2021
·
3 revisions
On Windows, each version of Python is associated with a particular MSVC compiler. This is because the runtimes from one compiler are generally not compatible forwards or backwards (though this is changing with VS 2015+).
This page is a superset of information at https://wiki.python.org/moin/WindowsCompilers. Extra information here is mostly of use for developing conda-build (finding where the compiler lives)
You can use either Visual Studio 2008 or the Microsoft Visual C++ compiler for Python 2.7 for this version.
Sources:
- VS 2008 Express (might be locatable somewhere on the internet)
- 32-bit only
- VS 2008 Pro (Available for purchase from 3rd parties, not sold by MS anymore)
- must manually select x64 compiler when installing
- make sure to apply service pack 1
- EXE paths:
- VS90COMNTOOLS environment variable
- C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
- Microsoft Visual C++ compiler for Python 2.7 (http://www.microsoft.com/en-us/download/details.aspx?id=44266 - 83 MB)
- 32-bit and 64-bit capable by default
- Does not include msbuild.exe - obtain from Win 7.1 SDK
- Does not set VS90COMNTOOLS - vcvarsall.bat may not be found. setuptools > 6 should know how to find it.
- EXE paths:
- System-wide install: C:\Program
- User-local install: %LOCALAPPDATA%\Programs\Common\Microsoft\Visual C++ for Python\9.0\
You can use either Visual Studio 2010 or the Windows 7.1 SDK for this version.
Sources:
- VS 2010 Express (might be locatable somewhere on the internet)
- 32-bit only
- VS 2010 Pro (Available for purchase from 3rd parties, not sold by MS anymore)
- make sure to apply service pack 1
- EXE paths:
- VS100COMNTOOLS environment variable
- C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
- Windows 7.1 SDK
- Web install: https://www.microsoft.com/en-us/download/details.aspx?id=8279
- ISO: https://www.microsoft.com/en-us/download/details.aspx?id=8442
- Has issues with VS 2010 runtimes being already installed. Follow directions at Python wiki carefully.
- Setuptools does not know how to use this. Conda-build has special logic for running setenv.cmd, instead of vcvarsall.bat. It would be nice to submit this upstream at some point.
Sources:
- VS 2015 Community or Professional: https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx
- Either way, make sure to install native build tools: https://blogs.msdn.microsoft.com/vcblog/2015/07/24/setup-changes-in-visual-studio-2015-affecting-c-developers/
- Visual CPP build tools: http://landinghub.visualstudio.com/visual-cpp-build-tools
- Check Windows 8.1 SDK and Windows 10 SDK options.