Fix building from source on WSL (#3112)

This commit is contained in:
Billy Cao 2024-03-01 03:13:58 +08:00 committed by GitHub
parent bfdcfa6a05
commit 2c08ff23c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,7 @@ def _is_neuron() -> bool:
torch_neuronx_installed = True
try:
subprocess.run(["neuron-ls"], capture_output=True, check=True)
except FileNotFoundError:
except (FileNotFoundError, PermissionError):
torch_neuronx_installed = False
return torch_neuronx_installed