A French soldier shot and seriously wounded a man armed with machetes who attacked him near the entrance to the Paris Louvre museum, in what President Francois Hollande said was a terrorist attack.

The man shouted "Allahu Akbar" (God is greatest) and rushed at police and soldiers before being shot near the museum's shopping mall, police said.

Police inquiries established that the man, who was hovering between life and death after being shot, was a 29-year-old Egyptian who arrived in France on 26 January after obtaining a tourist visa in Dubai, the Paris prosecutor said.

Security sources in Cairo identified the man as Abdullah Reda al-Hamamy, who was born in Dakahlia, a province north-east of Cairo.

Police have searched an apartment the man had rented in Paris and are now working to establish whether he acted alone, on impulse, or on orders from someone, prosecutor Francois Molins told a news conference.

The man was wearing a black T-shirt with a death's head emblem when he attacked soldiers checking bags near the museum's shopping mall "with a machete in each hand", Mr Molins said.

He struck one soldier and knocked another one to the ground. When he continued his attacks the soldier on the ground shot him in the abdomen, Mr Molins said.

Paint spray cans - but no explosives - were found in his backpack, a source close to the investigation said.

The Louvre, home to Leonardo da Vinci's 'Mona Lisa', ancient Egyptian artefacts and countless other treasures, is a major tourist attraction.

Housed in a former royal palace on the banks of the Seine, it welcomed 7.3 million visitors last year.

Visitors to the Louvre learned by loudspeaker announcement of the attempted attack and there was no panic, witnesses said, though some children cried as guards directed people to sit tight together and away from windows.
           
"(The announcement) came over the loudspeakers that are dotted around," said Paul Lecher, 68, a retired Parisian and frequent Louvre visitor.
           
"Everything happened calmly," he said. "It was just a case of listening ... People quickly understood, even those who didn't understand a word of French, that something unusual was happening."

Louvre officials closed the museum and kept visitors inside for a time before beginning to let them leave.

More than 230 people have died in France in the past two years at the hands of attackers allied to the so-called Islamic State group.

The country is less than three months away from a presidential election in which security and fears of terrorism are among the key issues.

Paris was also planning to submit its official bid to host the 2024 Olympic Games today with a launch show at the Eiffel Tower this evening.

The city had in recent months been gradually recovering from a dip in foreign tourism caused by the attacks.

The most recent deadly attack took place in the southern city of Nice in July last year when a man drove a truck into a crowd on the seafront killing 86.

In September, in an attempted attack, a group of women parked a car containing gas canisters near Paris's Notre Dame Cathedral.

Police cordoned off and evacuated the area around the museum for a time but began to allow traffic to pass less than two hours after the incident.

US President Donald Trump tweeted about the attack urging the US to "get smart".