Use sys.version_info instead of sys.version to obtain Python version

The `sys.version` value should not be used to obtain Python version information as there is no guarantee the version is at the beginning of the string.