Can hypopituitarism cause loss of libido?

It could be.
The pituitary gland is an important secretory organ of the body, secreting many types of hormones, such as growth hormone, adrenocorticotropic hormone, gonadotropin, lactogen, and sex hormones. When the function of the pituitary gland is diminished, the sex hormones produced by the pituitary gland are correspondingly diminished, so when sex hormones are reduced, the libido is diminished.