diff --git a/bin/CraftSetupHelper.py b/bin/CraftSetupHelper.py --- a/bin/CraftSetupHelper.py +++ b/bin/CraftSetupHelper.py @@ -379,6 +379,8 @@ # make sure that craftroot bin is the first to look for dlls etc self.prependEnvVar("PATH", os.path.join(CraftCore.standardDirs.craftRoot(), "bin")) self.prependEnvVar("PATH", os.path.join(CraftCore.standardDirs.craftRoot(), "dev-utils", "bin")) + # Prefer the same python we used to run this script (ie: the python from CraftSettings) + self.prependEnvVar("PATH", os.path.dirname(os.environ["CRAFT_PYTHON"])) # add python site packages to pythonpath self.prependEnvVar("PYTHONPATH", os.path.join(CraftCore.standardDirs.craftRoot(), "lib", "site-packages"))