Skip to content

Instantly share code, notes, and snippets.

@taldcroft
Created June 19, 2014 20:26
Show Gist options
  • Save taldcroft/b29a80ba2e305676a8a5 to your computer and use it in GitHub Desktop.
Save taldcroft/b29a80ba2e305676a8a5 to your computer and use it in GitHub Desktop.
import numpy
import matplotlib
import scipy # things like coordinates matching, modeling, convolution use this
import astropy
from distutils import version
# Astropy version 0.3.2 or later, and 0.4.0 for coordinates
astropy_version = version.LooseVersion(astropy.__version__)
if astropy_version < version.LooseVersion('0.3.2'):
print('Error: astropy version 0.3.2 or later is required, you have {0}'
.format(astropy.__version__))
if astropy_version < version.LooseVersion('0.4.0'):
print('Warning: astropy version 0.4.0 is later is needed for the '
'coordinates part of the tutorial, you have {0}. Consider installing 0.4 '
'if you want to do the coordinates exercises.'.format(astropy.__version__))
# BeautifulSoup4 for one bit of the ASCII tables section.
try:
import bs4
except ImportError:
print('Warning: BeautifulSoup4 is not installed, so you will not be able to '
'run the example for reading HTML tables. This is not required.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment