Skip to content

Instantly share code, notes, and snippets.

@Gabriel-p
Last active August 14, 2016 14:23
Show Gist options
  • Save Gabriel-p/c0d820d68382b35601e8 to your computer and use it in GitHub Desktop.
Save Gabriel-p/c0d820d68382b35601e8 to your computer and use it in GitHub Desktop.
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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment