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 diff --git a/spinup/utils/run_utils.py b/spinup/utils/run_utils.py index e1d7b56c9..32f3ade6a 100644 --- a/spinup/utils/run_utils.py +++ b/spinup/utils/run_utils.py @@ -166,7 +166,7 @@ def thunk_plus(): encoded_thunk = base64.b64encode(zlib.compress(pickled_thunk)).decode('utf-8') entrypoint = osp.join(osp.abspath(osp.dirname(__file__)),'run_entrypoint.py') - cmd = ['python', entrypoint, encoded_thunk] + cmd = [sys.executable if sys.executable else 'python', entrypoint, encoded_thunk] try: subprocess.check_call(cmd, env=os.environ) except CalledProcessError: @@ -554,4 +554,4 @@ def test_eg(): eg.add('why', [True,False]) eg.add('huh', 5) eg.add('no', 6, in_name=True) - return eg.variants() \ No newline at end of file + return eg.variants() diff --git a/spinup/version.py b/spinup/version.py index 84f86a447..0eca826f6 100644 --- a/spinup/version.py +++ b/spinup/version.py @@ -1,4 +1,4 @@ -version_info = (0, 1, 1) +version_info = (0, 1, 2) # format: # ('spinup_major', 'spinup_minor', 'spinup_patch')