White House press secretary Sean Spicer has claimed US President Donald Trump has a "healthy respect" for the press, despite lashing out at mainstream media during his first solo press conference.

Trump described the press as "dishonest people" during that conference and on Twitter called them "the enemy of the people" but his press secretary insisted that he respected the media.

"He has deep respect for the First Amendment and he has a healthy respect for the press," Spicer told reporters in comments carried by The Hill. He explained that Trump had been frustrated by coverage of his presidency and administration.

"I think it's a two-way street," he added.

The president's latest broadside followed a difficult week in the White House that included information leaks and the resignation of Trump's national security adviser Mike Flynn.

The president acknowledged that the leaks were real but claimed the information leaked was "fake news".

"The leaks are real but the news is fake because so much of the news is fake," Trump said.

"The first thing I thought when I saw this was 'how does the press get this classified information?'," he added.

"You know, because it's an illegal process. And the press should be ashamed of themselves.

"What happens when I'm dealing with North Korea? What happens when I'm dealing with the Middle East? Are you folks going to be reporting all that?

"We are going to stop it. That's why it's a criminal penalty."