This commit is contained in:
Koushik Dutta
2023-06-08 09:12:21 -07:00
parent be16bf7858
commit a31d6482af
3 changed files with 16 additions and 5 deletions

View File

@@ -603,12 +603,23 @@ class PluginRemote:
f.write(requirements)
f.close()
p = subprocess.Popen([
try:
pythonVersion = packageJson['scrypted']['pythonVersion']
except:
pythonVersion = None
pipArgs = [
sys.executable,
'-m', 'pip', 'install', '-r', requirementstxt,
# preevent uninstalling system packages
'--ignore-installed',
'--prefix', python_prefix
], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
]
if pythonVersion:
print('Specific Python verison requested. Forcing reinstall.')
pipArgs.append('--force-reinstall')
p = subprocess.Popen(pipArgs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
while True:
line = p.stdout.readline()