A crystal-structure prediction study with up to four independent molecules in all 230 space groups was undertaken for pyridine with a dispersion-corrected density functional theory method. The two known polymorphs, P212121 with Z′ = 1 and Pna21 with Z′ = 4, were found as ranks 1 and 2 in the correct stability order at low temperature. A pressure scan correctly predicts that the P212121 form is favoured under pressure. The completeness of the structure generation and the number of hypothetical crystal structures per energy interval are analysed as a function of Z′.