How do I check which version of NumPy I’m using?

Python Programming

Question or problem about Python programming:

How can I check which version of NumPy I’m using?

(FYI this question has been edited because both the question and answer are not platform specific.)

How to solve the problem:

Solution 1:

import numpy
numpy.version.version

Solution 2:

>> import numpy
>> print numpy.__version__

Solution 3:

From the command line, you can simply issue:

python -c "import numpy; print(numpy.version.version)"

Or:

python -c "import numpy; print(numpy.__version__)"

Solution 4:

Run:

pip list

Should generate a list of packages. Scroll through to numpy.

...
nbpresent (3.0.2)
networkx (1.11)
nltk (3.2.2)
nose (1.3.7)
notebook (5.0.0)
numba (0.32.0+0.g139e4c6.dirty)
numexpr (2.6.2)
numpy (1.11.3) <--
numpydoc (0.6.0)
odo (0.5.0)
openpyxl (2.4.1)
pandas (0.20.1)
pandocfilters (1.4.1)
....

Solution 5:

You can also check if your version is using MKL with:

import numpy
numpy.show_config()

Hope this helps!