Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork10.9k
Building with MSVC
These are instructions on building 32- and 64- bit Windows extensions andwheels on Windows, using the Microsoft Visual Studio compilers.
The compiler collection is called Microsoft Visual Studio (MSVS). The C andC++ compilers are a subset of Microsoft Visual Studio, and we'll call thatsubset Microsoft Visual C / C++ (MSVC).
All the install packages on this page are free to download and use, althoughthere are also non-free MSVS packages.
See also:https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
Python 2.7 needs Microsoft Visual Studio 2008 giving MSVC++ version 9.0 (seePython and MSVC).
Fortunately Microsoft provides a specific download of MSVS 2008 for buildingPython extensions athttps://aka.ms/vcpython27. SeeSteve Dower's distutilspostfor details.
You should be able to download and install from this installer to enablebuilding 32- and 64- bit Python extensions and wheels on Python 2.7, includingnumpy.
As for all MSVS installers, this package doesn't include a Fortran compiler, because there is no MSVSFortran compiler, so you cannot use this package for compiling Scipy.
Python 3.3 and 3.4 need MSVS 2010 (MSVC++ version 10.0).
Unfortunately there is no equivalent to the Python 2.7 installer for MSVS2008, so the installation is rather more complicated.
Your best bet is to install the MSVC compilers via the Windows 7.1 SDK packages - seethese instructions.
Python 3.5 was compiled with MSVS 2015. To compile Python 3.5 extensions, you can installVS 2015community edition. Be warned, this is a huge (> 10GB installed size) package that will take a long time to install.
The standard instructions are to compile extensions with the same version ofMSVS used to compile Python itself - MSVS 2008 for Python 2.7, MSVS 2010 forPython 3.3 and 3.4. If you try to compile extensions with different MSVSversions you may well run into clashes between the run-time libraries used bythe different MSVS versions.