Local media are reporting that at least two people have been killed but authorities are yet to confirm this information.
The incident took place in the town of Trebes in the south of the country, the French Interior Ministry said on Twitter.
Prime Minister Édouard Philippe said the situation was "serious". The gunman claims to be a member of the Islamic State group.
Police operation is underway in the area.