The Python Oracle

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

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Isolated

--

Chapters
00:00 How Do I Check Which Version Of Numpy I'M Using?
00:13 Accepted Answer Score 478
00:20 Answer 2 Score 293
00:26 Answer 3 Score 85
00:40 Answer 4 Score 37
00:55 Answer 5 Score 19
01:03 Thank you

--

Full question
https://stackoverflow.com/questions/1520...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #numpy #version

#avk47



ACCEPTED ANSWER

Score 483


import numpy
numpy.version.version



ANSWER 2

Score 300


import numpy
print(numpy.__version__)



ANSWER 3

Score 90


From the command line, you can simply issue:

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

Or:

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



ANSWER 4

Score 19


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

import numpy
numpy.show_config()