A rare female brown bear had to be shot in the Italian Alps as it threatened humans, a governor says.