Thursday, 3 October 2013

Observing tips #5 -- Checking Python versions

There is a lot of software that is used by LOFAR stations which is written in the Python computing language. While it is certainly a well-used and well-established software environment, there are certainly occasions when knowing the exact version of the libraries that you are using is very helpful.

In the case of KAIRA, we also use LOFAR software (and much of our software is conversely applicable to other LOFAR stations). So, there are occasions where we need to check on the version of a given installation.

To do this, we have this small Python programme which we use to check.


import sys
import numpy
import scipy
import ephem
import matplotlib
print "Installed versions..."
print "python =",sys.version
print "numpy =",numpy.version.version
print "scipy =",scipy.version.version
print "(py)ephem =",ephem.__version__
print "matplotlib =",matplotlib.__version__

Simply run it, and it will print out the version numbers of the typically used packages: Python itself, NumPy, SciPy, PyEphem and MatPlotLib.

When I ran it just now on one of the KAIRA machines, I read the following:

~> ./
Installed versions...
python = 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3]
numpy = 1.6.1
scipy = 0.9.0
(py)ephem =
matplotlib = 1.1.1rc

We hope that helps!

No comments:

Post a Comment