Mayor Rahm Emanuel on Wednesday all but threw in the towel on Chicago’s $2.25 billion quest to lure Amazon’s second North American headquarters and vowed to learn from it.

“One of the things I do know about in life: You don’t succeed unless you try,” the mayor said.

“Sometimes your biggest lessons in life where you learn the most is if you don’t succeed. What you can do better and what [were] those reasons?”

He added: “Nothing’s final. But I know the strengths of Chicago. [The city] not only has a plan for the first time. We have a blueprint and we have real strengths that are noticed that had not existed before.”

Emanuel was asked to pinpoint the “biggest lessons” learned from Chicago’s apparent failure to win the Amazon sweepstakes.

“I didn’t say we’ve lost Amazon. Don’t over-interpret. That’s actually what I’ve asked the staff to study. I don’t think within 24 hours you do that,” he said.

“I pulled the team together and said, `What was right? What improvements have we made? … It reaffirms the fundamentals. But I also think there are things in particular that we have to learn. I’ll wait for my team, which I’ve asked [deputy mayor] Bob Rivkin to head up … to come back with an analysis of what worked and didn’t work. Part of that will also be in conversation of learning certain things we don’t have yet from Amazon.”

Earlier this week, the New York Times and the Wall Street Journal reported that Amazon appears to have made a split decision between Crystal City, Va. and the Long Island City neighborhood of Queens, N.Y.

That essentially means that the economic plum of the century — with a $5 billion investment and 50,000 six-figure jobs — likely would be shared by those two locations, mitigating the impact to any one place.

Emanuel and Gov. Bruce Rauner, who was resoundingly defeated on Tuesday, had joined forces on a $2.25 billion incentive package to lure Amazon.

After promising an “all hands-on-deck, all-resources-to-bear” bid, Emanuel had also put together a cheerleading squad comprised of 600 of Chicago’s movers-and-shakers.

None of that was enough, apparently. But Emanuel is not about to throw in the towel. He’s been way too successful in attracting corporations to move their headquarters to Chicago, many of them from the suburbs, including McDonald’s.

“The bigger piece of this is what I have tried to do since Day One. Grow the economy, grow jobs by focusing on the fundamentals. I know you guys are exhausted by this, but it is the truth,” the mayor told reporters after a City Council meeting.

“Talent is a driving factor. The pipeline of universities and colleges that feed that talent is essential for your economic development. I’ll be leaving here and going to O’Hare with another modernization. That reach is very fundamental. Part of that is what we’ve been doing on our mass transit system, then creating a real ecosystem in our tech economy and a diversity that never existed before.”

The mayor also stressed the progress he has made in dramatically reducing the city’s structural deficit and at least beginning to solve Chicago’s $28 billion pension crisis.

“Taking care of business here fiscally, which used to be a question mark and a flashing yellow mark on the city,” he said.

“Since we’ve shown the will to fix it — and we’re not done — Chicago for five consecutive years has led the country in corporate relocations and for six years led the country in foreign investment into the city.”