The fluorescence spectra of individual semiconducting single-walled carbon nanotubes embedded in polymer films were measured during the application of controlled stretching and compressive strains. Nanotube band gaps were found to shift in systematic patterns that depend on the (n,m) structural type and are in excellent agreement with the predictions of theoretical models. Loss of nanotube-host adhesion was revealed by abrupt irregularities in plots of spectral shift vs strain.