Provided in the present invention is a type of pyrazolopyrimidine compound as shown in formula (I) or a pharmaceutically acceptable salt thereof, and a preparation method thereof and the use of same in the preparation of a drug for treating or preventing cancers. Such a compound is a new-type PIK3 inhibitor and has an excellent inhibitory activity, and can hopefully be used for treating a variety of malignant tumors.La présente invention concerne un type de composé de pyrazolopyrimidine tel que représenté dans la formule (I) ou un sel pharmaceutiquement acceptable de celui-ci, et son procédé de préparation et son utilisation dans la préparation d'un médicament pour le traitement ou la prévention de cancers. Un tel composé est un inhibiteur PIK3 de type nouveau et a une excellente activité inhibitrice, et peut être efficacement utilisé pour traiter diverses tumeurs malignes. (I)本发明提供了式(I)所示的一类吡唑并嘧啶化合物或其药学可接受的盐及其制备方法和在制备治疗或预防癌症的药物中的应用。该类化合物是新型的PI3K抑制剂,具有优异的抑制活性,有望用于多种恶性肿瘤的治疗。