"The individual does not seem to be known by police," one police source said.
A second source said it appeared that two students had opened fire on the headmaster, who had been injured, adding that the suspects did not seem to be militants.
"One of the two was arrested and the second fled. There was panic and the students took refuge in the (neighbouring) supermarket," said the source.
Interior ministry spokesman Pierre-Henry Brandet told France Inter radio that three people had been injured, and advised families to remain patient as police took control to stabilise the situation. He had earlier told BFM TV eight were injured.
He said checks were underway on the possibility of a second assailant.
The incident comes with France in a state of emergency after several militants attacks over the last year. It is less than six weeks away from a presidential election in which security and fears of terrorism are among key issues.
"I went to close the windows and saw a guy who looked at me in the eyes. He seemed to be a student and not very big. He shot in the air and ran away," the student said without giving his name.
Local emergency services advised residents on Twitter to stay at home. The government launched its mobile telephone application warning of a "terrorist" attack.
(Reporting by Emmanuel Jarry, Sophie Louet, and John Irish; Editing by Adrian Croft and Sudip Kar-Gupta)
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.