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.)
For Python 3.X print syntax:
python -c "import numpy; print (numpy.version.version)"
Or
python -c "import numpy; print(numpy.__version__)"
import numpy
print numpy.__version__
It is good to know the version of numpy
you run, but strictly speaking if you just need to have specific version on your system you can write like this:
pip install numpy==1.14.3
and this will install the version you need and uninstall other versions of numpy
.
From the command line, you can simply issue:
python -c "import numpy; print(numpy.version.version)"
Or:
python -c "import numpy; print(numpy.__version__)"
In a Python shell:
>>> help()
help> numpy
Simply
pip show numpy
and for pip3
pip3 show numpy
Works on both windows and linux. Should work on mac too if you are using pip.