It has long been known that a large fraction of disc galaxies are lopsided. We simulate three different mechanisms that can induce lopsidedness: flyby interactions, gas accretion from cosmological filaments and ram pressure from the intergalactic medium. Comparing the morphologies, HI spectrum and m=1 Fourier components, we find that all of these mechanisms can induce lopsidedness in the gaseous component of disc galaxies. In particular, we estimate that flybys can contribute to ~20 per cent of lopsided galaxies. We compare our simulations with the observations of NGC 891, a lopsided, edge-on galaxy with a nearby companion (UGC 1807). We find that the main properties of NGC 891 favour a flyby event for the origin of lopsidedness in this galaxy.