[Numpy-discussion] Any plans for windows 64-bit installer for 1.7?

Christoph Gohlke cgohlke@uci....
Thu Feb 7 03:51:38 CST 2013


On 2/6/2013 10:35 PM, Ondřej Čertík wrote:
> Christoph,
>
> On Tue, Feb 5, 2013 at 3:04 PM, Christoph Gohlke <cgohlke@uci.edu> wrote:
> [...]
>>> In order not to leave this discussion without a resolution:
>>>
>>> Christophe - would you allow us to distribute your numpy binaries for
>>> 1.7 from the numpy sourceforge page?
>>>
>>> Cheers,
>>>
>>> Matthew
>>
>>
>> I am OK with providing 64 bit "numpy-MKL" binaries (that is numpy
>> compiled with MSVC compilers and linked to Intel's MKL) for official
>> numpy releases.
>>
>> However:
>>
>> 1) There seems to be no real consensus and urge for doing this. Using a
>> free toolchain capable of building the whole scipy-stack would be much
>> preferred. Several 64 bit Python distributions containing numpy-MKL are
>> already available, some for free.
>>
>> 2) Releasing 64 bit numpy without matching scipy binaries would make
>> little sense to me.
>>
>> 3) Please do not just redistribute the binaries from my website and
>> declare them official. They might contain unreleased fixes from git
>> master and pull requests that are needed for my work and other packages.
>>
>> 4) Numpy-MKL requires the Intel runtime DLLs (MKL is linked statically
>> btw). I ship those with the installers and append the directory
>> containing the DLLs to os.environ['PATH'] in numpy/__init__.py. This is
>> a big no-no according to numpy developers. I don't agree. Anyway, those
>> changes are not in the numpy source repositories.
>>
>> 5) My numpy-MKL installers are Python distutils bdist_wininst
>> installers. That means if Python was installed for all users, installing
>> numpy-MKL on Windows >6.0 will prompt for UAC elevation. Another no-no?
>
> I think that all these things should be possible to fix so that the
> binary is acceptable
> for the official NumPy binary.
>
> How exactly do you build the binaries? I wasn't able to find the info at:
>
> http://www.lfd.uci.edu/~gohlke/pythonlibs/
>
> Do you have some scripts to do that? Do you use PowerShell? Or you do
> it by hand by mouse and clicks in Visual Studio somehow? If I can
> figure out how to do these builds, I'll be happy to figure out how to
> automate it and then we can try to figure out a solution that works
> for NumPy.
>
> Ondrej

My development/build environment is listed at 
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#buildenv>. Not that it helps 
much...

Assuming that Windows 7|8 Pro 64 bit, Visual Studio 2008 Pro SP1 (with 
64 bit compiler option), Visual Studio 2010 Pro, Intel Composer XE 2013, 
64 bit CPython 2.6, 2.7, 3.2 and 3.3 are installed, the following batch 
script (no need for PowerShell or an IDE) should build 64 bit numpy-MKL 
installers when run from within the numpy source directory. I do not 
really use this script but the "secrets" are there. It can be extended 
for building eggs and MSIs, 32 bit, and automated testing. Probably not 
all the libraries listed in site.cfg are needed but this works for me 
also with scipy and other packages.


@echo off
setlocal
set ICDIR=C:/Program Files (x86)/Intel/Composer XE
rem Work around a bug in numpy distutils. Requires admin privileges
fsutil hardlink create "%ICDIR%/mkl/lib/intel64/libiomp5md.lib" 
"%ICDIR%/compiler/lib/intel64/libiomp5md.lib"
fsutil hardlink create "%ICDIR%/mkl/lib/intel64/libifportmd.lib" 
"%ICDIR%/compiler/lib/intel64/libifportmd.lib"
rem Create site.cfg for static linking to 64 bit MKL
echo [mkl] > site.cfg
echo include_dirs = %ICDIR%/mkl/include >> site.cfg
echo library_dirs = %ICDIR%/mkl/lib/intel64;%ICDIR%/compiler/lib/intel64 
 >> site.cfg
echo mkl_libs = 
mkl_lapack95_lp64,mkl_blas95_lp64,mkl_intel_lp64,mkl_intel_thread,mkl_core,libiomp5md,libifportmd 
 >> site.cfg
echo lapack_libs = 
mkl_lapack95_lp64,mkl_blas95_lp64,mkl_intel_lp64,mkl_intel_thread,mkl_core,libiomp5md,libifportmd 
 >> site.cfg
rem Build installers using distutils
rd /q /s build
call C:\Python26\python.exe setup.py bdist_wininst 
--user-access-control=auto
rd /q /s build
call C:\Python27\python.exe setup.py bdist_wininst 
--user-access-control=auto
rd /q /s build
call C:\Python32\python.exe setup.py bdist_wininst 
--user-access-control=auto
copy /Y build\py3k\dist\*.exe dist\
rd /q /s build
call C:\Python33\python.exe setup.py bdist_wininst 
--user-access-control=auto
copy /Y build\py3k\dist\*.exe dist\
rd /q /s build
endlocal

--
Christoph


More information about the NumPy-Discussion mailing list