A dioecious annual of disturbed waste places, cultivated ground, particularly in allotments and gardens, rubbish tips, walls, and roadsides, thriving on light, nutrient-rich soils. It produces a long-lived seed bank. Lowland.
A rhizomatous, dioecious perennial herb usually growing on damp but free-draining base-rich soils. In the lowlands it is largely restricted to shaded sites, including ancient woodland, older secondary woodland, hedgerows and shaded banks, but in the uplands it occurs on unshaded basic crags, scree, cliff ledges and in ravines, particularly on moist N.-facing slopes, and it also grows in the grikes of limestone pavements. 0-1005 m (Ben Lawers, Mid Perth).