While I prefer pine nuts and they are what is traditionally used in pesto, you can substitute them with toasted walnuts or pecans.