A French diplomatic source said 40 French nationals, including the ambassador, had been evacuated by ship along with seven British nationals.
France’s embassy in Tripoli has been closed temporarily, the French foreign ministry said on its website.
Libya has been gripped by instability since the 2011 uprising.