how to check for a python package version at runtime