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():
7575
7676
7777def  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). 
172177def  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
188187def  main (args ):
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments