Existence of conformal metrics with constant $Q$-curvature