diff --git a/Modules/getpath.py b/Modules/getpath.py index f84e6e8afaf62c..3a13bfdf491a14 100644 --- a/Modules/getpath.py +++ b/Modules/getpath.py @@ -277,7 +277,7 @@ def search_up(prefix, *landmarks, test=isfile): # executable path was provided in the config. real_executable = executable -if not executable and program_name: +if not executable and program_name and ENV_PATH: # Resolve names against PATH. # NOTE: The use_environment value is ignored for this lookup. # To properly isolate, launch Python with a full path.