From 5162975fc8e16fcce48bfaf5d4cda36e94a7f0ae Mon Sep 17 00:00:00 2001 From: Albert Wu Date: Fri, 23 Nov 2018 10:49:32 -0800 Subject: [PATCH] use curr python interp. in subprocess --- spinup/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spinup/run.py b/spinup/run.py index 60ea25dd4..0482cb506 100644 --- a/spinup/run.py +++ b/spinup/run.py @@ -221,7 +221,7 @@ def process(arg): elif cmd in valid_utils: # Execute the correct utility file. runfile = osp.join(osp.abspath(osp.dirname(__file__)), 'utils', cmd +'.py') - args = ['python', runfile] + sys.argv[2:] + args = [sys.executable if sys.executable else 'python', runfile] + sys.argv[2:] subprocess.check_call(args, env=os.environ) else: # Assume that the user plans to execute an algorithm. Run custom