summaryrefslogtreecommitdiff
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 2f353feb323..a1322239b35 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1664,7 +1664,11 @@ uniqueness for different types of configurations."
(defun python-shell-parse-command ()
"Calculate the string used to execute the inferior Python process."
- (format "%s %s" python-shell-interpreter python-shell-interpreter-args))
+ (let ((process-environment (python-shell-calculate-process-environment))
+ (exec-path (python-shell-calculate-exec-path)))
+ (format "%s %s"
+ (executable-find python-shell-interpreter)
+ python-shell-interpreter-args)))
(defun python-shell-calculate-process-environment ()
"Calculate process environment given `python-shell-virtualenv-path'."