Could you try to uninstall all PyTorch installations, sync the submodules and rebuild?
Also, if that doesn’t help, create a new (conda) environment and try to build PyTorch there.
If that still doesn’t help, could you please post the stack trace here?