B. constrictor flourishes in a wide variety of environmental conditions, from tropical rainforests to arid semidesert country.[14] However, it prefers to live in rainforest due to the humidity and temperature, natural cover from predators, and vast amount of potential prey. It is commonly found in or along rivers and streams, as it is a very capable swimmer. Boa constrictors also occupy the burrows of medium-sized mammals, where they can hide from potential predators.