Let G be a complex semi-simple group, and X a compact Riemann surface. The moduli space of principal G-bundles on X, and in particular the holomorphic line bundles on this space and their global sections, play an important role in the recent applications of Conformal Field Theory to algebraic geometry. In this paper we determine the Picard group of this moduli space when G is of classical or G$_2$ type (we consider both the coarse moduli space and the moduli stack).