Provided is a pyrazolopyrimidine compound represented by formula (I) having an HIF-PHD inhibitory effect, or a pharmaceutically acceptable salt thereof. [In the formula, AA indicates an optionally substituted 7-hydroxypyrazolo[4,3-d]pyrimidine-5-yl, X indicates a simple bond or an optionally substituted straight-chain alkylene, Z indicates hydrogen atom, or formula (i), formula (ii) or formula (iii), and rings A and A' are independently an optionally substituted aryl, an optionally substituted heteroaryl, an optionally substituted alicyclic hydrocarbon, or an optionally substituted non-aromatic heterocycle.]