Gabriel-p
11/19/2014 - 5:31 PM

Check version number of python and several packages

Check version number of python and several packages


import sys

print 'Versions\n'

print 'python', sys.version

try:
    import numpy
    print 'numpy', numpy.__version__
except:
    print 'numpy not installed'

try:
    import matplotlib
    print 'matplotlib', matplotlib.__version__
except:
    print 'matplotlib not installed'

try:
    import scipy
    print 'scipy', scipy.__version__
except:
    print 'scipy not installed'

try:
    import rpy2
    print 'rpy2', rpy2.__version__
except:
    print 'rpy2 not installed'