From f359a7167af2a78651652b008aa72e3ac2c8c9fc Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 28 Feb 2023 21:53:15 -0800 Subject: [PATCH] server: nuke python prefix prior to install to purge old conflicting deps --- server/python/plugin_remote.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/python/plugin_remote.py b/server/python/plugin_remote.py index 8da82e11c9..7d0148eb89 100644 --- a/server/python/plugin_remote.py +++ b/server/python/plugin_remote.py @@ -3,7 +3,6 @@ import asyncio import base64 import gc -import json import sys import os import platform @@ -21,7 +20,6 @@ from os import sys from typing import Any, List, Optional, Set, Tuple -import aiofiles import scrypted_python.scrypted_sdk.types from scrypted_python.scrypted_sdk import ScryptedStatic, PluginFork from scrypted_python.scrypted_sdk.types import Device, DeviceManifest, EventDetails, ScryptedInterfaceProperty, Storage @@ -330,6 +328,9 @@ async def loadZip(self, packageJson, zipData, options: dict=None): pass if need_pip: + shutil.rmtree(python_prefix) + os.makedirs(python_prefix) + print('requirements.txt (outdated)') print(str_requirements)