From e0dcb3da40a96b3b380f409d7f412e8c425eeecf Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 16 Aug 2017 11:15:26 +0100 Subject: [PATCH 07/16] Win32: Ensure Library\bin is in os.environ["PATH"] --- Lib/site.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/site.py b/Lib/site.py index 0d33d6351b..522773aae7 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -547,6 +547,11 @@ def main(): execsitecustomize() if ENABLE_USER_SITE: execusercustomize() + if sys.platform == 'win32': + # Anaconda Distribution hack in-case the environment has not been activated properly. + library_bin = r"%s\Library\bin" % (sys.prefix) + if library_bin not in os.environ["PATH"]: + os.environ["PATH"] = library_bin+";"+os.environ["PATH"] # Prevent edition of sys.path when python was started with -S and # site is imported later. -- 2.14.3 (Apple Git-98)