Three-component heterocyclizations of pyruvic acids and their esters with 5-aminopyrazoles and aromatic aldehydes, in addition to the sequential versions of these reactions, under different activating conditions were studied. Under conventional heating, pyrazolopyrimidine derivatives containing a hydroxyl group in the 6-position were formed in both two- and three-component treatments. Whereas the application of an inert atmosphere did not influence the outcome of these reactions, the use of ultrasonic irradiation led to the formation of 7-hydroxy-tetrahydropyrazolopyrimidines in multi-component reactions and 6-hydroxy-dihydropyrazolopyrimidines in the case of a step-by-step approach. The products of the latter treatment were further transformed into heteroaromatized 6-hydroxy-pyrazolopyrimidines by conventional heating.