The upper atmosphere of a planet is a transition region in which energy is transferred between the deeper atmosphere and outer space. Molecular emissions from the upper atmosphere (90-120km altitude) of Venus can be used to investigate the energetics and to trace the circulation of this hitherto little-studied region. Previous spacecraft and ground-based observations of infrared emission from CO2, O2 and NO have established that photochemical and dynamic activity controls the structure of the upper atmosphere of Venus. These data, however, have left unresolved the precise altitude of the emission owing to a lack of data and of an adequate observing geometry. Here we report measurements of day-side CO2 non-local thermodynamic equilibrium emission at 4.3µm, extending from 90 to 120km altitude, and of night-side O2 emission extending from 95 to 100km. The CO2 emission peak occurs at ~115km and varies with solar zenith angle over a range of ~10km. This confirms previous modelling, and permits the beginning of a systematic study of the variability of the emission. The O2 peak emission happens at 96km+/-1km, which is consistent with three-body recombination of oxygen atoms transported from the day side by a global thermospheric sub-solar to anti-solar circulation, as previously predicted.