From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 28 Jan 2020 10:52:47 +0000 (-0800) Subject: bpo-39439: Fix multiprocessing spawn path in a venv on Windows (GH-18158) X-Git-Tag: v3.8.2rc1~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dbb37aac1428ddcba784d9ddc77c1708c391aa80;p=thirdparty%2FPython%2Fcpython.git bpo-39439: Fix multiprocessing spawn path in a venv on Windows (GH-18158) (cherry picked from commit 0be3246d4f9c8eddcd55491901d95b09fe163f15) Co-authored-by: Adam Meily --- diff --git a/Lib/multiprocessing/spawn.py b/Lib/multiprocessing/spawn.py index 075f3455478b..7cc129e26107 100644 --- a/Lib/multiprocessing/spawn.py +++ b/Lib/multiprocessing/spawn.py @@ -36,7 +36,7 @@ else: if WINSERVICE: _python_exe = os.path.join(sys.exec_prefix, 'python.exe') else: - _python_exe = sys._base_executable + _python_exe = sys.executable def set_executable(exe): global _python_exe diff --git a/Misc/NEWS.d/next/Windows/2020-01-24-03-15-05.bpo-39439.sFxGfR.rst b/Misc/NEWS.d/next/Windows/2020-01-24-03-15-05.bpo-39439.sFxGfR.rst new file mode 100644 index 000000000000..d677c4c3e02d --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-01-24-03-15-05.bpo-39439.sFxGfR.rst @@ -0,0 +1 @@ +Honor the Python path when a virtualenv is active on Windows. \ No newline at end of file