diff --git a/st4_py38/lsp_utils/pip_client_handler.py b/st4_py38/lsp_utils/pip_client_handler.py index 196ac3e..59ee6f3 100644 --- a/st4_py38/lsp_utils/pip_client_handler.py +++ b/st4_py38/lsp_utils/pip_client_handler.py @@ -50,7 +50,11 @@ def get_python_binary(cls) -> str: When only the binary name is specified then it will be expected that it can be found on the PATH. """ - return 'py' if sublime.platform() == 'windows' else 'python3' + if sublime.platform() == 'windows': + if shutil.which('py'): + return 'py' + return 'python' + return 'python3' # --- GenericClientHandler handlers -------------------------------------------------------------------------------