Checking installation status of Python packages, optimizing translation interface text

Former-commit-id: 6fbe746b8675c175220ddd80335d9127ab42883f
This commit is contained in:
Physton
2023-05-29 01:58:04 +08:00
parent 614577ad5b
commit 97eb4e5687
14 changed files with 244 additions and 1690 deletions

View File

@@ -13,11 +13,12 @@ packages = {
"aliyunsdkalimt": "aliyun-python-sdk-alimt",
}
for package_name in packages:
package = packages[package_name]
try:
if not launch.is_installed(package_name):
launch.run_pip(f"install {package}", f"sd-webui-prompt-all-in-one: {package_name}")
except Exception as e:
print(e)
print(f'Warning: Failed to install {package}, some preprocessors may not work.')
if __name__ == "__main__":
for package_name in packages:
package = packages[package_name]
try:
if not launch.is_installed(package_name):
launch.run_pip(f"install {package}", f"sd-webui-prompt-all-in-one: {package_name}")
except Exception as e:
print(e)
print(f'Warning: Failed to install {package}, some preprocessors may not work.')