Make sure your pumpkin has at least one nearby open space near the stem. Additionally, you must make sure that the block next to the pumpkin stem is made of grass, dirt, or farmland. Make sure there is sufficient light so the pumpkins can grow.