From 84d2006393b1c89fb77a4b2f572e01a1b8246807 Mon Sep 17 00:00:00 2001 From: ryuan <950298+ryuan@users.noreply.github.com> Date: Mon, 9 Oct 2023 23:54:59 -0500 Subject: [PATCH] closes #121 so M1/M2 Macs can properly install and update package dependencies --- install.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install.py b/install.py index 018d500..5bba6ff 100644 --- a/install.py +++ b/install.py @@ -1,4 +1,5 @@ import launch +import platform def update_transparent_background(): from importlib.metadata import version as meta_version @@ -8,6 +9,12 @@ def update_transparent_background(): if version.parse(v) < version.parse('1.2.3'): launch.run_pip("install -U transparent-background", "update transparent-background version for Ebsynth Utility") +# Check if user is running an M1/M2 device and, if so, install pyvirtualcam, which is required for updating the transparent_background package +# Note that we have to directly install from source because the prebuilt PyPl wheel does not support ARM64 machines such as M1/M2 Macs +if platform.system() == "Darwin" and platform.machine() == "arm64": + if not launch.is_installed("pyvirtualcam"): + launch.run_pip("install git+https://github.com/letmaik/pyvirtualcam", "requirements for Ebsynth Utility") + if not launch.is_installed("transparent_background"): launch.run_pip("install transparent-background", "requirements for Ebsynth Utility")