“My thoughts immediately go out to the victim, her family and the entire educational community, whose deep shock I share,” he wrote on X.
President Emmanuel Macron was being kept up-to-date on the teacher’s condition, presidential aides said.
France has seen a series of incidents in which pupils have attacked teachers or other schoolchildren.
A 14-year-old schoolboy was last year charged with the murder of a teaching assistant after allegedly stabbing her to death in June.
He attacked the 31-year-old, a mother of a young boy, during a bag search in the eastern town of Nogent.
In a separate case, a student in April killed a girl and wounded several other pupils in a stabbing spree in the western city of Nantes.
Many educators said they often thought of a geography and history teacher, Samuel Paty, who was decapitated in 2020 by a radicalised young man after having shown his class caricatures of the Prophet Muhammad.
-Agence France-Presse