Python version should be taken from sys.version_info

Python version information should be taken from `sys.version_info`, not `sys.version` (see https://docs.python.org/2/library/sys.html#sys.version_info). There is no guarantee the string `sys.version` will start with the version number in all Python interpreters.