Certified GKH Gardening Expert
Both conditions will cause all male blossoms. This is likely what is happening. You won't get fruit until the conditions are right for a female flower, which will have a mini fruit attached to it. Unfortunately, unless these are in a controlled environment, it will just be a waiting game for conditions to become favorable.
This article will give you more information: https://www.gardeningknowhow.com/edible/vegetables/pumpkin/pumpkin-flowers-but-no-fruit.htm