Microsoft Visual C++ Compiler for Python 2.7

I'll post this on the various other lists later, but I promised distutils-sig first taste, especially since the discussion has been raging for a few days (if you're following the setuptools repo, you may already know, but let me take the podium for a few minutes anyway :) ) Microsoft has released a compiler package for Python 2.7 to make it easier for people to build and distribute their C extension modules on Windows. The Microsoft Visual C++ Compiler for Python 2.7 (a.k.a. VC9) is available from: http://aka.ms/vcpython27 This package contains all the tools and headers required to build C extension modules for Python 2.7 32-bit and 64-bit (note that some extension modules require 3rd party dependencies such as OpenSSL or libxml2 that are not included). Other versions of Python built with Visual C++ 2008 are also supported, so "Python 2.7" is just advertising - it'll work fine with 2.6 and 3.2. You can install the package without requiring administrative privileges and, with the latest version of setuptools (from the source repo - there's no release yet), use tools such as pip, wheel, or a setup.py file to produce binaries on Windows. The license prevents redistribution of the package itself (obviously you can do what you like with the binaries you produce) and IANAL but there should be no restriction on using this package on automated build systems under the usual one-developer rule (http://stackoverflow.com/a/779631/891 - in effect, the compilers are licensed to one user who happens to be using it on a remote machine). My plan is to keep the download link stable so that automated scripts can reference and install the package. I have no idea how long that will last... :) Our intent is to heavily focus on people using this package to produce wheels rather than trying to get this onto every user machine. Binary distribution is the way Windows has always worked and we want to encourage that, though we do also want people to be able to unblock themselves with these compilers. I should also point out that VC9 is no longer supported by Microsoft. This means there won't be any improvements or bug fixes coming, and there's no official support offered. Feel free to contact me directly <steve.dower@microsoft.com> if there are issues with the package. Cheers, Steve

On 27 September 2014 03:59, Steve Dower <Steve.Dower@microsoft.com> wrote:
I'll post this on the various other lists later, but I promised distutils-sig first taste, especially since the discussion has been raging for a few days (if you're following the setuptools repo, you may already know, but let me take the podium for a few minutes anyway :) )
Microsoft has released a compiler package for Python 2.7 to make it easier for people to build and distribute their C extension modules on Windows. The Microsoft Visual C++ Compiler for Python 2.7 (a.k.a. VC9) is available from: http://aka.ms/vcpython27
Wonderful news Steve, thanks! Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia

On Sep 27, 2014 12:32 AM, "Steve Dower" <Steve.Dower@microsoft.com> wrote:
I'll post this on the various other lists later, but I promised
distutils-sig first taste, especially since the discussion has been raging for a few days (if you're following the setuptools repo, you may already know, but let me take the podium for a few minutes anyway :) )
Microsoft has released a compiler package for Python 2.7 to make it
easier for people to build and distribute their C extension modules on Windows. The Microsoft Visual C++ Compiler for Python 2.7 (a.k.a. VC9) is available from: http://aka.ms/vcpython27
This package contains all the tools and headers required to build C
extension modules for Python 2.7 32-bit and 64-bit (note that some extension modules require 3rd party dependencies such as OpenSSL or libxml2 that are not included). Other versions of Python built with Visual C++ 2008 are also supported, so "Python 2.7" is just advertising - it'll work fine with 2.6 and 3.2 What that buys us in comparision to simply using VC 2008 Express?

It's free (VC Express 2008 is behind a pay wall these days) It's small (85MB download, 300mb on installed) It's a per-user install with no reboot required If you have the permissions, time, and access for VC Express 2008, it gains you nothing. You're not the intended target audience (I thought I had that wording in the announcement, but I guess not). Most people don't have or want Visual Studio installed on their machine, or need to install on a machine where they're not admin (think university student on a lab machine who needs Cython). Cheers, Steve Top-posted from my Windows Phone ________________________________ From: Piotr Dobrogost<mailto:p@2014.dobrogost.net> Sent: 9/27/2014 3:34 To: Steve Dower<mailto:Steve.Dower@microsoft.com> Cc: distutils sig<mailto:distutils-sig@python.org> Subject: Re: [Distutils] Microsoft Visual C++ Compiler for Python 2.7 On Sep 27, 2014 12:32 AM, "Steve Dower" <Steve.Dower@microsoft.com<mailto:Steve.Dower@microsoft.com>> wrote:
I'll post this on the various other lists later, but I promised distutils-sig first taste, especially since the discussion has been raging for a few days (if you're following the setuptools repo, you may already know, but let me take the podium for a few minutes anyway :) )
Microsoft has released a compiler package for Python 2.7 to make it easier for people to build and distribute their C extension modules on Windows. The Microsoft Visual C++ Compiler for Python 2.7 (a.k.a. VC9) is available from: http://aka.ms/vcpython27
This package contains all the tools and headers required to build C extension modules for Python 2.7 32-bit and 64-bit (note that some extension modules require 3rd party dependencies such as OpenSSL or libxml2 that are not included). Other versions of Python built with Visual C++ 2008 are also supported, so "Python 2.7" is just advertising - it'll work fine with 2.6 and 3.2
What that buys us in comparision to simply using VC 2008 Express?

Thank you very Steve for pushing that installer out, this is very appreciated. What is the story for project maintainers who want to also support Python 3.3+ (for 32 bit and 64 bit python) for their project with binary wheels for windows? At the moment it's possible to use the Windows SDK as documented here: http://scikit-learn.org/dev/install.html#building-on-windows However getting VC Express + Windows SDK is hard and slow to setup and cannot be scripted in a CI environment. In the mean time, it's possible to use CI environments that already feature all the necessary versions of the VC compilers and libraries such as appveyor.com, see this demo project: https://github.com/ogrisel/python-appveyor-demo https://ci.appveyor.com/project/ogrisel/python-appveyor-demo -- Olivier

On 30 September 2014 16:56, Olivier Grisel <olivier.grisel@ensta.org> wrote:
What is the story for project maintainers who want to also support Python 3.3+ (for 32 bit and 64 bit python) for their project with binary wheels for windows?
It would be so easy at this point to ask "What's the chance of a similarly packaged version of VS2010 for Python 3.2/3.3/3.4?" But I really don't want Steve to get into any trouble with people saying "now look what you've started" :-) Paul

Paul Moore wrote:
On 30 September 2014 16:56, Olivier Grisel <olivier.grisel@ensta.org> wrote:
What is the story for project maintainers who want to also support Python 3.3+ (for 32 bit and 64 bit python) for their project with binary wheels for windows?
It would be so easy at this point to ask "What's the chance of a similarly packaged version of VS2010 for Python 3.2/3.3/3.4?" But I really don't want Steve to get into any trouble with people saying "now look what you've started" :-)
:-) The answer is basically no chance - the slippery slope was considered and shut down. If VC14 slips significantly and we have to stick with VC10 for Python 3.5, then I'll make the case again and see what we get, but for now the future story is to upgrade. Luckily, 3.3->3.5 is not going to be as hard as 2.7->3.5. Cheers, Steve
Paul

On 30 September 2014 17:07, Steve Dower <Steve.Dower@microsoft.com> wrote:
The answer is basically no chance - the slippery slope was considered and shut down.
Fair enough. Actually, it's good to know that this sort of thing was thought through.
If VC14 slips significantly and we have to stick with VC10 for Python 3.5, then I'll make the case again and see what we get, but for now the future story is to upgrade. Luckily, 3.3->3.5 is not going to be as hard as 2.7->3.5.
Agreed - and given that VC14 Express will include 32- and 64-bit compilers, the whole SDK rigmarole is avoided which was the key pain point (well, that and the fact that things went out of support, but the forward compatibility of VC14 addresses that one too). Paul

2014-09-30 18:07 GMT+02:00 Steve Dower <Steve.Dower@microsoft.com>:
Paul Moore wrote:
On 30 September 2014 16:56, Olivier Grisel <olivier.grisel@ensta.org> wrote:
What is the story for project maintainers who want to also support Python 3.3+ (for 32 bit and 64 bit python) for their project with binary wheels for windows?
It would be so easy at this point to ask "What's the chance of a similarly packaged version of VS2010 for Python 3.2/3.3/3.4?" But I really don't want Steve to get into any trouble with people saying "now look what you've started" :-)
:-)
The answer is basically no chance - the slippery slope was considered and shut down.
If VC14 slips significantly and we have to stick with VC10 for Python 3.5, then I'll make the case again and see what we get, but for now the future story is to upgrade. Luckily, 3.3->3.5 is not going to be as hard as 2.7->3.5.
Alright, sounds good. Thanks again. -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel

Olivier Grisel wrote:
Thank you very Steve for pushing that installer out, this is very appreciated.
What is the story for project maintainers who want to also support Python 3.3+ (for 32 bit and 64 bit python) for their project with binary wheels for windows? At the moment it's possible to use the Windows SDK as documented here:
http://scikit-learn.org/dev/install.html#building-on-windows
However getting VC Express + Windows SDK is hard and slow to setup and cannot be scripted in a CI environment.
It can be, but there are a few tricks involved...
In the mean time, it's possible to use CI environments that already feature all the necessary versions of the VC compilers and libraries such as appveyor.com, see this demo project:
https://github.com/ogrisel/python-appveyor-demo https://ci.appveyor.com/project/ogrisel/python-appveyor-demo
This is the best way to have it set up - create a base VM image for your CI environment manually and clone it. I believe all the major cloud providers support this, though using a CI specialist like Appveyor makes it even easier. As far as the future story, it will probably be "move to 3.5 on VC14 as soon as possible". Internally, I'll be pushing for a CI-compatible installer for our build tools, which I expect will actually get quite a bit of traction right now. Unfortunately, going back in time to do it for both VC9 and VC10 was not an option. We chose VC9 because 2.7 is where people are stuck, while migrating from 3.3->3.5 should not be as big an issue. Cheers, Steve
-- Olivier
participants (6)
-
Nick Coghlan
-
Olivier Grisel
-
Paul Moore
-
Piotr Dobrogost
-
Steve Dower
-
Vinay Sajip