From 13dc14ce6f5e2447611f4a2f5bf00ab383a2c6ad Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 8 Jul 2022 10:41:42 +1000 Subject: [PATCH] Revert "Use python executable we were invoked with (#3303)" (#3309) This reverts commit 0d9317addfb2c496dcbe32c4491ebe99db304be5. --- tasks.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tasks.py b/tasks.py index 9870477c01..5161676321 100644 --- a/tasks.py +++ b/tasks.py @@ -79,9 +79,8 @@ def manage(c, cmd, pty: bool = False): cmd: Django command to run. pty (bool, optional): Run an interactive session. Defaults to False. """ - c.run('cd "{path}" && {python} manage.py {cmd}'.format( + c.run('cd "{path}" && python3 manage.py {cmd}'.format( path=managePyDir(), - python=sys.executable, cmd=cmd ), pty=pty) @@ -97,7 +96,7 @@ def plugins(c): print(f"Installing plugin packages from '{plugin_file}'") # Install the plugins - c.run(f"{sys.executable} -m pip install --disable-pip-version-check -U -r '{plugin_file}'") + c.run(f"pip3 install --disable-pip-version-check -U -r '{plugin_file}'") @task(post=[plugins]) @@ -106,7 +105,7 @@ def install(c): print("Installing required python packages from 'requirements.txt'") # Install required Python packages with PIP - c.run(f'{sys.executable} -m pip install --no-cache-dir --disable-pip-version-check -U -r requirements.txt') + c.run('pip3 install --no-cache-dir --disable-pip-version-check -U -r requirements.txt') @task @@ -115,7 +114,7 @@ def setup_dev(c): print("Installing required python packages from 'requirements-dev.txt'") # Install required Python packages with PIP - c.run(f'{sys.executable} -m pip install -U -r requirements-dev.txt') + c.run('pip3 install -U -r requirements-dev.txt') # Install pre-commit hook c.run('pre-commit install') @@ -172,7 +171,7 @@ def translate_stats(c): The file generated from this is needed for the UI. """ path = os.path.join('InvenTree', 'script', 'translation_stats.py') - c.run(f'{sys.executable} {path}') + c.run(f'python3 {path}') @task(post=[translate_stats, static])