File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,13 @@ def python_is_compatible():
75
75
76
76
77
77
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 .
79
79
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
+ )
80
85
sys .exit (1 )
81
86
82
87
# pip packages needed by exir.
@@ -171,18 +176,12 @@ def install_optional_example_requirements(use_pytorch_nightly):
171
176
# PyTorch stopped building macOS x86_64 binaries since version 2.3.0 (January 2024).
172
177
def is_intel_mac_os ():
173
178
# 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 (
175
180
"x86" ,
176
181
"x86_64" ,
177
182
"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
+
186
185
187
186
188
187
def main (args ):
You can’t perform that action at this time.
0 commit comments