From 48da7e5de8bc672a3f518419235f503d4f7d8307 Mon Sep 17 00:00:00 2001 From: kovan Date: Fri, 13 Feb 2026 23:52:38 +0100 Subject: [PATCH] fix(python): use Scripts/ for venv executables on Windows `+python-executable-find` hardcodes `bin/` as the virtualenv executable directory, but Windows virtualenvs use `Scripts/`. Ref: #5826 Co-authored-by: Claude Opus 4.6 --- modules/lang/python/autoload/python.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/python/autoload/python.el b/modules/lang/python/autoload/python.el index d7daa0836..0cffb1720 100644 --- a/modules/lang/python/autoload/python.el +++ b/modules/lang/python/autoload/python.el @@ -8,7 +8,7 @@ falling back on searching your PATH." (if (file-name-absolute-p exe) (and (file-executable-p exe) exe) - (let ((exe-root (format "bin/%s" exe))) + (let ((exe-root (format (if (featurep :system 'windows) "Scripts/%s" "bin/%s") exe))) (cond ((when python-shell-virtualenv-root (let ((bin (expand-file-name exe-root python-shell-virtualenv-root))) (if (file-exists-p bin) bin))))