def version(bin_env=None):
    pip_bin = _get_pip_bin(bin_env)

    output = __salt__['cmd.run'](
        '{0} --version'.format(pip_bin), python_shell=False)
    try:
        return re.match(r'^pip (\S+)', output).group(1)
    except AttributeError:
        return None
.. versionadded:: 0.17.0
dataset/ETHPy150Open saltstack/salt/salt/modules/pip.py/version