A freely suspended current carrying solenoid aligns itself in the north-south direction.
A freely suspended magnet aligns itself in the north-south direction in a room and air is sucked from that room through the vacuum pump. So, now there is no air in the room but still, the magnet aligns itself in the north-south direction.