I’m not too sure what you mean by “aneorobic environment” but alcohol is produced by alcoholic fermentation. Lactic acid is produced in lactic acid fermentation, but they both start off with glycolysis because the whole point of fermentation is basically to produce oxygen when your body can’t inhale enough.