The causes of pyloric stenosis are unknown, but genetic and environmental factors might play a role. Pyloric stenosis usually isn't present at birth and probably develops afterward