Last active
August 14, 2016 14:23
-
-
Save Gabriel-p/c0d820d68382b35601e8 to your computer and use it in GitHub Desktop.
Check version number of python and several packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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