NumPy for Python 2.7 on 64 bit Windows

23,380

Solution 1

I suggest WinPython, a Python 2.7 distribution for Windows with both 32- and 64-bit versions.

This blog post by the WinPython creator explains why it is generally difficult to find 64-bit Windows NumPy:

According to experienced developers, there is no decent open-source (free) Fortran compiler for the Windows 64bit platform. As a consequence, it's impossible to build NumPy or SciPy on this platform using only free and open-source tools. That's why there is no official Windows 64bit binaries for these two libraries. The only ready-to-use installers available out there were prepared by Christoph Gohlke (using Intel Fortran compiler, a.k.a. 'ifort') and these are clearly unofficial binaries. Furthermore, Christoph has built two different installers for NumPy: one unoptimized and one optimized with the Intel Math Kernel Library (MKL), hence providing better performance. And Gohlke's SciPy 64bit binary package (the only one available freely online) require NumPy MKL. The problem is that, according to Christoph Gohlke, the MKL license does not allow me (or anyone else) to redistribute these binaries, unless I have purchased such a license. It is still unclear to me if the end user would also require this license too. Hopefully no. Let's assume that. Besides, after reading carefully the Intel MKL License terms, I'm quite sure that I can redistribute the MKL-based NumPy built because it's just runtime redistribution. So I think I will purchase an Intel Fortran Compiler license (including MKL) to be able to rebuild NumPy and SciPy in the near future but in the meantime I will just redistribute the packages built by Christoph Gohlke.

Solution 2

I don't know where else to find it but I'd like to mention that it actually isn't that difficult to build yourself, if you have the numpy source and a MSVC compiler.

Numpy builds using the python distutils package and as such deals with manifest files. If you are using VC9 then you can probably go right ahead.

I did this today using the VC10 compiler, and as such had to alter my distutils package (msvc9compiler.py) to not handle any manifests. I simply commented out those lines. Then before I built the package, I set the env var to point to my actual compiler:

set VS90COMNTOOLS=%VS100COMNTOOLS%
c:\python27_64\python.exe setup.py build

And after the build, I find the numpy package in the build folder.

Numpy complains a lot about ATLAS and BLAS and stuff, but in the end, you'll get a compiled numpy that will run the tests successfully.

Share:
23,380
Admin
Author by

Admin

Updated on February 19, 2020

Comments

  • Admin
    Admin about 4 years

    I have been trying to get NumPy for Python 2.7 on Windows 64 bit, but the page http://www.lfd.uci.edu/~gohlke/pythonlibs/ that everyone mentions isn't opening on any of my devices.

    Is there somewhere else I may find it?

  • peter karasev
    peter karasev about 11 years
    will you share the modified file? $ reward if it gets me un-stuck
  • JCash
    JCash about 11 years
    Sorry, I don't think I have it anymore. And also, I did this at work and I think I'd have difficulties sharing it. Do you really need to compile it yourself? Downloading the precompiled version 32/64 bit) is still easier.