Gamayun, Iorgov and Lisovyy in 2012 proposed that tau function of the Painlevé equation is equal to the series of c= 1 Virasoro conformal blocks. We study similar series of c= - 2 conformal blocks and relate it to Painlevé theory. The arguments are based on Nakajima–Yoshioka blowup relations on Nekrasov partition functions. We also study series of q-deformed c= - 2 conformal blocks and relate it to q-Painlevé equation. As an application, we prove formula for the tau function of q-Painlevé A7(1)′ equation.