Daniel Möller
Daniel Möller

Reputation: 86600

Tutorial for installing numpy with OpenBLAS on Windows

Please, I do need a light here. I want to install numpy using a good BLAS/LAPACK lib on Windows, but absolutely no page explains the process well enough. It seems OpenBLAS is a good and fast option.

The goal is to use "theano" with "keras", and "theano" requires that the libraries be "dynamic", not static. (Not sure I understand what that means, but it causes slowness and memory issues)

Please treat me as a complete newbie. Give me a step by step tutorial on how to do it! Don't forget to tell me "where" files should go! Which folders should go in PATH! What commands exactly I should call, and what are their output, where? What do I do with their results or with compiled files? How does numpy find them? Etc. All the sites I've seen seem to think I'm a linux expert and already know everything.

What I have tried:

Upvotes: 7

Views: 13175

Answers (4)

Thomas
Thomas

Reputation: 205

Year 2021: this works with miniconda on Windows 10

conda create -n openblas python=3.8
conda activate openblas
conda install conda-forge::blas=*=openblas
conda install -c conda-forge numpy

Tested also with matplotlib-base.

Upvotes: 5

Joao Vital
Joao Vital

Reputation: 51

Tried following the building instructions in http://scipy.github.io/devdocs/building/windows.html a number of times without success.

[MY SOLUTION]

After extensive reading of the logs and related forums, came up with a method that has worked for me in two windows machines already. Posted a batch file with the steps I used in https://github.com/jhvital/build-scipy-openblas.

The show_config method shows linkage to openblas libraries, and this was confirmed by comparing the runtimes of scripts against the scipy installed with conda install scipy, which installs the mkl package.

Still I'm not entirely sure whether the libraries were linked correctly. Feedback would be appreciated.

Upvotes: 3

Pavan
Pavan

Reputation: 9

I am not sure what's the error you have recieved when trying to get openblas & numpy using anaconda.

For openblas on windows using anaconda3 python 3.6v this works:

conda install -c menpo openblas

ref: https://anaconda.org/menpo/openblas

For numpy: it is :conda install numpy. if you are looking for a specific version of numpy use: conda install numpy=version_number

Upvotes: 0

percusse
percusse

Reputation: 3106

The build instructions for SciPy is tested a number of times and it seems to be working.

You can find the instructions here http://scipy.github.io/devdocs/building/windows.html

Note that this is still a very delicate procedure and needs to be done very carefully. It still does not guarantee success thanks to Windows being Windows. However please take the time to report any issues should you encounter any at https://github.com/scipy/scipy.org/issues (notice it is not the scipy repo but but scipy.org repo)

Upvotes: 0

Related Questions