  Upcoming weak lensing surveys will survey large cosmological volumes to
measure the growth of cosmological structure with time and thereby constrain
dark energy. One major systematic uncertainty in this process is the
calibration of the weak lensing shape distortions, or shears. Most upcoming
surveys plan to test several aspects of their shear estimation algorithms using
sophisticated image simulations that include realistic galaxy populations based
on high-resolution data from the Hubble Space Telescope (HST). However,
existing datasets from the (HST) cover very small cosmological volumes, so
cosmic variance could cause the galaxy populations in them to be atypical. A
narrow redshift slice from such surveys could be dominated by a single large
overdensity or underdensity. In that case, the morphology-density relation
could alter the local galaxy populations and yield an incorrect calibration of
shear estimates as a function of redshift. We directly test this scenario using
the COSMOS survey, the largest-area (HST) survey to date, and show how the
statistical distributions of galaxy shapes and morphological parameters (e.g.,
S\'{e}rsic $n$) are influenced by redshift-dependent cosmic variance. The
typical variation in RMS ellipticity due to environmental effects is 5 per cent
(absolute, not relative) for redshift bins of width $\Delta z=0.05$, which
could result in uncertain shear calibration at the 1 per cent level. We
conclude that the cosmic variance effects are large enough to exceed the
systematic error budget of future surveys, but can be mitigated with careful
choice of training dataset and sufficiently large redshift binning.
