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.)
import numpy
numpy.version.version
>> import numpy
>> print numpy.__version__
You can get numpy version using Terminal or a Python code.
In a Terminal (bash) using Ubuntu:
pip list | grep numpy
In python 3.6.7, this code shows the numpy version:
import numpy
print (numpy.version.version)
If you insert this code in the file shownumpy.py, you can compile it:
python shownumpy.py
or
python3 shownumpy.py
I've got this output:
1.16.1
Pure Python line that can be executed from the terminal (both 2.X and 3.X versions):
python -c "import numpy; print(numpy.version.version)"
If you are already inside Python, then:
import numpy
print(numpy.version.version)