diff --git a/setup.py b/setup.py index 16978d74e0425..1f48be948aa84 100644 --- a/setup.py +++ b/setup.py @@ -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