I guess you should use a try/except? Versioneer appears to catch EnvironmentError when trying these.