There was a bit of a weed problem on the set of “Kid Cannabis.” The film, out Friday, tells the real-life tale of how 19-year-old high-school dropout and pizza delivery guy Nate Norman became a marijuana-dealing kingpin.

“We would shoot real pot because it would look better on camera, and then we’d try to smoke the fake pot,” says director John Stockwell, who shot certain scenes in a real-life marijuana-growing facility in Canada, where the crew was driven in a van with blacked-out windows. “Sometimes, the prop guy would get them confused.”

Norman, played by Jonathan Daniel Brown (“Project X”), was a pudgy nerd in Coeur d’Alene, Idaho, who smoked lots of weed, delivered pizzas, sold dime bags on occasion and was taunted for his resemblance to the Keebler Elf. “He was a wallflower, schlubby kid,” says Stockwell, “who went from $6 an hour at a pizza place to making millions a year smuggling weed across the border.”

So how did this socially awkward misfit become, within mere months, the leader of a marijuana empire who would eventually be accused of moving at least 7 tons — worth $38 million?

It began as a whim with his buddy Topher Clark (Kenny Wormald), when the two decided to try smuggling a pound of pot through the woods across the nearby Canadian border.

“They weren’t dealing with the Cali drug cartel or Pablo Escobar. They were dealing with hippie growers in Canada,” says Stockwell. “It was pretty simple, and, originally, very low-tech and nonviolent.”

Norman and Clark recruited some friends, and after finding a supplier, they would don ghillie suits — camouflage suits worn by hunters that made them look like Bigfoot — and walk the weed through the woods and into the States.

“It was like, ‘OK, that worked, let’s try it again. We’ll [smuggle the weed] with eight guys instead of four,’ ” says Stockwell. “Then, people were bombarding him. Cheerleaders and jocks were like, ‘Can we get in on this?’ It was a very poorly kept secret.”

Local authorities had reportedly been aware of Norman’s activities, but were too consumed with meth cases to bother with a pot dealer. But when a rival dealer named Brendan Butler turned up dead — the men he had hired to kill Norman turned on him instead — the operation became big-time in the eyes of the law.

When Norman’s friends were arrested, they flipped on him immediately, fingering him as the mastermind. In 2004, at the age of 21, Norman was sentenced to 12 years in prison. (He was released early, and is currently living under home confinement in Coeur d’Alene.)

Stockwell visited Norman when he first heard about the story and found him, after years in prison, to still be that happy, kind of nerdy kid he was when this all began: “The irony of the story is, almost all the kids, when asked if they would do it again, said absolutely. It was the best time of their lives.”