in scripts/ebcli_installer.py [0:0]
def _locate_virtualenv_executable():
"""
Function attempts to find the location at which `virtualenv` is installed.
If such a location is found, the function returns normally. Otherwise, the
function further proceeds to check for `pip` and informs the user that either
or both of `pip` and `virtualenv` are missing.
:param quiet: a boolean indicating whether minimal output printed should be
non-verbose, minimal.
:return: None
:side-effect: script will exit with a non-0 return code if a
virtualenv and/or pip executables haven't been found.
"""
virtualenv_executables = ['virtualenv']
if sys.platform.startswith('win32'):
virtualenv_executables += ['virtualenv.cmd', 'virtualenv.exe']
virtualenv_executable = None
for _virtualenv_executable in virtualenv_executables:
if _executable_found(_virtualenv_executable, True):
virtualenv_executable = _virtualenv_executable
if not virtualenv_executable:
if not _pip_executable_found(True):
print(PIP_AND_VIRTUALENV_NOT_FOUND)
else:
print(VIRTUALENV_NOT_FOUND)
return virtualenv_executable