108

It looks like the only 64 bit windows installer for Numpy is for Numpy version 1.3.0 which only works with Python 2.6

http://sourceforge.net/projects/numpy/files/NumPy/

It strikes me as strange that I would have to roll back to Python 2.6 to use Numpy on Windows, which makes me think I'm missing something.

Am I?

twasbrillig
  • 17,084
  • 9
  • 43
  • 67
Chris
  • 9,603
  • 15
  • 46
  • 67
  • 12
    This should be reopened; it's a useful resource for Windows Python Developers. While the question may not have been worded correctly, the resources below are valuable. – Will Jan 23 '16 at 07:39

6 Answers6

162

Try the (unofficial) binaries in this site:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

You can get the newest numpy x64 with or without Intel MKL libs for Python 2.7 or Python 3.

JBernardo
  • 32,262
  • 10
  • 90
  • 115
  • 18
    There is a reason mentioned at http://spyder-ide.blogspot.de/2012/08/scientific-python-distribution-for.html : "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." – Hans Oct 19 '12 at 09:15
  • Why can't they use mingw64? – DanielSank Jun 02 '14 at 18:28
  • Any idea what happened to the non-MKL-dependent releases? – user541686 Jun 13 '14 at 21:58
  • @Mehrdad Probably maintenance burden because of the incompatibility with some other packages. – JBernardo Jun 15 '14 at 07:55
  • @JBernardo: That's unfortunate. So that means there's no way to run NumPy without downloading the MKL now (unless we recompile it)? – user541686 Jun 15 '14 at 08:40
  • 1
    @Mehrdad you don't need to download the MKL. The package is already compiled with it – JBernardo Jun 16 '14 at 17:55
  • @JBernardo: I thought the MKL is not redistributable though? – user541686 Jun 16 '14 at 19:24
  • 2
    @Mehrdad seems like the MKL is redistributable... (from https://software.intel.com/en-us/articles/intel-math-kernel-library-licensing-faq): _Can I redistribute the Intel Math Kernel Library with my application? Yes. When you purchase Intel MKL, you receive rights to redistribute computational portions of Intel MKL with your application._ – reverse_engineer Aug 19 '14 at 13:56
  • Does the Intel MKL version (for example available here : http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy) work on comptuers with AMD CPU? Or only Intel CPU? Does this version work 100% of the time? – Basj Nov 22 '14 at 21:25
  • Can anyone tell me I have numpy git packages, but dont know where should i put these packages to get use in python - Idle – gandhi Mar 03 '15 at 07:12
  • Wasted a lot of time trying to install on Windows from various binaries and installers, which all seemed to install a broken version, until I found that this worked: navigate to the python install directory and do python .\site-packages\pip install numpy – Richard Whitehead Nov 10 '17 at 12:49
42

Assuming you have python 2.7 64bit on your computer and have downloaded numpy from here, follow the steps below (changing numpy‑1.9.2+mkl‑cp27‑none‑win_amd64.whl as appropriate).

  1. Download (by right click and "save target") get-pip to local drive.

  2. At the command prompt, navigate to the directory containing get-pip.py and run

    python get-pip.py

    which creates files in C:\Python27\Scripts, including pip2, pip2.7 and pip.

  3. Copy the downloaded numpy‑1.9.2+mkl‑cp27‑none‑win_amd64.whl into the above directory (C:\Python27\Scripts)

  4. Still at the command prompt, navigate to the above directory and run:

    pip2.7.exe install "numpy‑1.9.2+mkl‑cp27‑none‑win_amd64.whl"

Hobo
  • 7,536
  • 5
  • 40
  • 50
mutiibwa
  • 521
  • 4
  • 3
27

Download numpy-1.9.2+mkl-cp27-none-win32.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy .

Copy the file to C:\Python27\Scripts

Run cmd from the above location and type

pip install numpy-1.9.2+mkl-cp27-none-win32.whl

You will hopefully get the below output:

Processing c:\python27\scripts\numpy-1.9.2+mkl-cp27-none-win32.whl
Installing collected packages: numpy
Successfully installed numpy-1.9.2

Hope that works for you.

EDIT 1
Adding @oneleggedmule 's suggestion:

You can also run the following command in the cmd:

pip2.7 install numpy-1.9.2+mkl-cp27-none-win_amd64.whl

Basically, writing pip alone also works perfectly (as in the original answer). Writing the version 2.7 can also be done for the sake of clarity or specification.

akshaynagpal
  • 2,965
  • 30
  • 32
  • 2
    I used pip2.7.exe instead, just to be safe. So the command that worked for me is `pip2.7 install numpy-1.9.2+mkl-cp27-none-win_amd64.whl`. Also, the [cp-number](https://pypi.python.org/pypi/numpy) in the binary filename refers to the Python version e.g. cp27, cp33, cp34 – ruhong Aug 27 '15 at 02:41
6

The (unofficial) binaries (http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy) worked for me.
I've tried Mingw, Cygwin, all failed due to varies reasons. I am on Windows 7 Enterprise, 64bit.

Jay Zheng
  • 61
  • 1
  • 1
5

You may also try this, anaconda http://continuum.io/downloads

But you need to modify your environment variable PATH, so that the anaconda folder is before the original Python folder.

Robert
  • 303
  • 1
  • 4
  • 10
5

It is not improbable, that programmers looking for python on windows, also use the Python Tools for Visual Studio. In this case it is easy to install additional packages, by taking advantage of the included "Python Environment" Window. "Overview" is selected within the window as default. You can select "Pip" there.

Then you can install numpy without additional work by entering numpy into the seach window. The coresponding "install numpy" instruction is already suggested.

Nevertheless I had 2 easy to solve Problems in the beginning:

  • "error: Unable to find vcvarsall.bat": This problem has been solved here. Although I did not find it at that time and instead installed the C++ Compiler for Python.
  • Then the installation continued but failed because of an additional inner exception. Installing .NET 3.5 solved this.

Finally the installation was done. It took some time (5 minutes), so don't cancel the process to early.

Community
  • 1
  • 1
BaluJr.
  • 1,010
  • 2
  • 11
  • 25