Skip to content

Commit a47238b

Browse files
committed
Restore fallback installs for audio and vision; move print statement; update docs url
1 parent 695c782 commit a47238b

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

install_requirements.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,13 @@ def python_is_compatible():
7575

7676

7777
def install_requirements(use_pytorch_nightly):
78-
# Prevent pip install on Intel-based macOS systems (no prebuilt PyTorch binaries available).
78+
# Skip pip install on Intel macOS if using nightly.
7979
if use_pytorch_nightly and is_intel_mac_os():
80+
print(
81+
"ERROR: Prebuilt PyTorch wheels are no longer available for Intel-based macOS.\n"
82+
"Please build from source by following https://docs.pytorch.org/executorch/main/using-executorch-building-from-source.html",
83+
file=sys.stderr,
84+
)
8085
sys.exit(1)
8186

8287
# pip packages needed by exir.
@@ -171,18 +176,12 @@ def install_optional_example_requirements(use_pytorch_nightly):
171176
# PyTorch stopped building macOS x86_64 binaries since version 2.3.0 (January 2024).
172177
def is_intel_mac_os():
173178
# Returns True if running on Intel macOS
174-
if platform.system().lower() == "darwin" and platform.machine().lower() in (
179+
return platform.system().lower() == "darwin" and platform.machine().lower() in (
175180
"x86",
176181
"x86_64",
177182
"i386",
178-
):
179-
print(
180-
"ERROR: Prebuilt PyTorch wheels are no longer available for Intel-based macOS.\n"
181-
"Please build from source by following https://docs.pytorch.org/executorch/main/using-executorch-building-from-source.html",
182-
file=sys.stderr,
183-
)
184-
return True
185-
return False
183+
)
184+
186185

187186

188187
def main(args):

0 commit comments

Comments
 (0)