From 07b166bb1bc40714230d3405a08d52b6aee53fb3 Mon Sep 17 00:00:00 2001 From: iperov Date: Sat, 12 Jun 2021 08:15:31 +0400 Subject: [PATCH] fix PATH addition in windows should set PATH, not add to the tail the copy of PATH --- onnxruntime/python/_pybind_state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/python/_pybind_state.py b/onnxruntime/python/_pybind_state.py index e76d402681..e7ea3efa88 100644 --- a/onnxruntime/python/_pybind_state.py +++ b/onnxruntime/python/_pybind_state.py @@ -57,7 +57,7 @@ if platform.system() == "Windows": # Python 3.7 (and earlier) searches directories listed in PATH variable. # Make sure that the target CUDA version is at the beginning (important if multiple CUDA versions are # installed on the machine.) - os.environ["PATH"] += cuda_bin_dir + os.pathsep + os.environ["PATH"] + os.environ["PATH"] = cuda_bin_dir + os.pathsep + os.environ["PATH"] if version_info.vs2019 and platform.architecture()[0] == "64bit": if not os.path.isfile("C:\\Windows\\System32\\vcruntime140_1.dll"):