diff --git a/server/python/plugin_remote.py b/server/python/plugin_remote.py index df8a023358..72ac297307 100644 --- a/server/python/plugin_remote.py +++ b/server/python/plugin_remote.py @@ -833,8 +833,8 @@ def read_requirements(filename: str) -> str: print("requirements.txt (up to date)") print(str_requirements) - sys.path.insert(0, plugin_zip_paths.get("unzipped_path")) - sys.path.insert(0, pip_target) + sys.path.append(plugin_zip_paths.get("unzipped_path")) + sys.path.append(pip_target) self.systemManager = SystemManager(self.api, self.systemState) self.deviceManager = DeviceManager(self.nativeIds, self.systemManager) diff --git a/server/src/plugin/runtime/python-worker.ts b/server/src/plugin/runtime/python-worker.ts index 5af12a18be..f1261097c4 100644 --- a/server/src/plugin/runtime/python-worker.ts +++ b/server/src/plugin/runtime/python-worker.ts @@ -46,7 +46,10 @@ export class PythonRuntimeWorker extends ChildProcessWorker { const { env, pluginDebug } = options; const args: string[] = [ + // unbuffered stdout/stderr '-u', + // prevent any global packages from being used + '-S', ]; if (pluginDebug) {