Pine nuts can be replaced in traditional basil pesto with a variety of nuts or seeds. Walnuts, almonds, almonds, pistachios, and sunflower seeds are all great substitutes for pine nuts.