Both fresh and canned pumpkin are high in fiber as well as magnesium, which both help relieve constipation. However, do introduce fiber-rich foods slowly as too much at once can actually contribute to constipation.