code: def _get_conda_version(stdout, stderr):
          
          # argparse outputs version to stderr in Python < 3.4.
          # http://bugs.python.org/issue18920
          pat = re.compile(r'conda:?\s+(\d+\.\d\S+|unknown)')
          m = pat.match(stderr.decode().strip())
          if m is None:
              m = pat.match(stdout.decode().strip())
  
          if m is None:
              raise Exception('output did not match: {0}'.format(stderr))
  
          return m.group(1)
docs: Callback for get_conda_version.