BOB MCMANUS: With Amazon gone, everyone sees that Emperor Andrew has no clothes.

Emperor Andrew has no clothes — and Amazon noticed.

Or perhaps Jeff Bezos was channeling George Bernard Shaw — “I learned long ago never to wrestle with a pig. You get dirty, and the pig likes it” — and decided that, whatever the upside of a major presence in the Big Apple, the cost of doing business here was just too high.

Either way, arrivederci Amazon!

What’s astonishing is that the digital ­dynamo decided to come to Queens in the first place.

Isn’t the bulk of Gov. Cuomo’s economic-development varsity — including his ­as-close-as-a-brother top aide — on its way to prison because of the team’s first-term pocket-lining? Haven’t all of his grand plans flopped spectacularly, one after another and usually mired in scandal?

And then there is Mayor de Blasio, a party to the Amazon deal and a fellow who spent most of his first term under investigation for corrupt practices; who has a kindergartener’s attention span; and who nobody takes seriously anyway — to say nothing of trusts.

Why would any self-respecting company want to do business in such an environment?

That is, in a culture where a signed, sealed and delivered agreement traditionally is just a starting point for the so-called community-benefits-agreement shakedown — the process where local politicians attempt to squeeze cash and other considerations from good-faith investors.

And, sure enough, local pols began circling the deal the instant it was announced — ­piously preaching policy concerns, but clearly on the make for extracurricular advantages. It’s a tradition, don’t you know.

Thing is, when you’re one of the world’s most significant economic engines, you don’t have to play by local rules.

So Bezos bagged it.

It’s also a lesson to other pols, in other places in the future, not to get too greedy.