From 0990f5d424a7d64cd93f48baa89902af987688e1 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 7 Dec 2021 17:41:06 -0800 Subject: [PATCH] server: relax python3 version --- server/python/plugin-remote.py | 3 ++- server/src/plugin/plugin-host.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/python/plugin-remote.py b/server/python/plugin-remote.py index ee9f03334..5bc16ad8b 100644 --- a/server/python/plugin-remote.py +++ b/server/python/plugin-remote.py @@ -164,7 +164,8 @@ class PluginRemote: if not os.path.exists(python_prefix): os.makedirs(python_prefix) - python = 'python3.7' + python = 'python%s' % str(sys.version_info[0])+"."+str(sys.version_info[1]) + print('python:', python) if 'requirements.txt' in zip.namelist(): requirements = zip.open('requirements.txt').read() diff --git a/server/src/plugin/plugin-host.ts b/server/src/plugin/plugin-host.ts index 30dcd117f..441e1c3c1 100644 --- a/server/src/plugin/plugin-host.ts +++ b/server/src/plugin/plugin-host.ts @@ -236,7 +236,7 @@ export class PluginHost { path.join(__dirname, '../../python', 'plugin-remote.py'), ) - this.worker = child_process.spawn('python3.7', args, { + this.worker = child_process.spawn('python3', args, { // stdin, stdout, stderr, peer in, peer out stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe'], env: Object.assign({}, process.env, env),