Skip to content

Commit

Permalink
server: fix python search order
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Dec 22, 2024
1 parent 4c6ca3b commit 0d9d425
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/python/plugin_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions server/src/plugin/runtime/python-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0d9d425

Please sign in to comment.