The classical second virial coefficients B(T) for nitrogen and carbon monoxide have been calculated exactly as a function of temperature for three different realistic models of the intermolecular potential. The potential models, due to Kohin, Raich and Mills, and Raich and Gillis, differ mainly, but not solely, in the way in which they represent the short-range Coulomb repulsion between molecules. As this interaction depends on the molecules' shapes, it is highly anisotropic. To ensure good accuracy in the results for B(T) the angular and radial integrals were performed by suitable Gaussian integration methods.The contributions to B(T) of various anisotropic terms are considered, and a power series expansion in terms of the anisotropic part of the potential discussed. The calculated results are compared with experiments, and some general conclusions drawn.