in scripts/ebcli_installer.py [0:0]
def _pip_executable_found(quiet):
"""
Function attempts to locate one of pip, pip2, and pip3 and returns True
if it can find one of them, else False.
In addition to the form `pip<x>`, `pip` may also be installed as `pip<x.y>`.
We avoid checking for these as the likelihood that `pip` got installed as
`pip<x.y>` but not as `pip<x>`
:return: True/False
"""
pip_executables = ['pip', 'pip2', 'pip3']
if sys.platform.startswith('win32'):
pip_executables += [
'pip.exe', 'pip2.exe', 'pip3.exe',
'pip.cmd', 'pip2.cmd', 'pip3.cmd',
]
for executable in pip_executables:
if _executable_found(executable, quiet):
if not quiet:
print('Found {}'.format(executable))
return True