From df30cbae1af898976b9d88da4c8b395bfccb52ea Mon Sep 17 00:00:00 2001 From: Kartik Date: Thu, 14 Mar 2019 17:00:05 +0530 Subject: [PATCH] Fix to locate carla python package in performance_benchmark.py --- PythonAPI/performance_benchmark.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PythonAPI/performance_benchmark.py b/PythonAPI/performance_benchmark.py index 2c35d5095..b5985295e 100644 --- a/PythonAPI/performance_benchmark.py +++ b/PythonAPI/performance_benchmark.py @@ -29,6 +29,17 @@ import shutil import subprocess from tr import tr import threading +import glob +import os +import sys + +try: + sys.path.append(glob.glob('**/carla-*%d.%d-%s.egg' % ( + sys.version_info.major, + sys.version_info.minor, + 'win-amd64' if os.name == 'nt' else 'linux-x86_64'))[0]) +except IndexError: + pass import carla