His interest in politics indirectly inspired his marijuana business. Mr. Rifici, who volunteers as chief financial officer of the Liberal Party of Canada, one of the three main national parties, closely tracked the evolution of marijuana laws.

In October 2012, Health Canada, the federal agency responsible for drug controls, published a long, technical list of proposed reforms. One thing caught his eye: Under the new approach, customers could buy only online or through call centers, types of systems that his Internet businesses had operated.

But his background didn’t prepare him for the regulatory strictures of the medical marijuana business. Accustomed to developing start-ups on the fly with little capital, Mr. Rifici and Mr. Linton, another Ottawa entrepreneur who is Tweed’s chairman, underestimated the money they would need by a factor of three, largely because of the government’s regulatory demands. The application ran 300 pages, not including attachments. And before they could even submit applications, Tweed and other growers had to secure sites for their operations and obtain all local permissions. Applicants who passed the initial vetting then had to pass a final, two-day inspection.

The requirements are significant. Growers must have sophisticated carbon filtration systems to prevent the smell of marijuana from wafting outside. They must maintain high-security measures like biometric thumbprint readers. Employees need to pass rigorous security checks, conducted by the Royal Canadian Mounted Police, which take four to six months.

“If I knew how much regulatory overhead there would be from the beginning, I would have probably been just as excited about the industry,” Mr. Rifici said. “But I might have thought that I might not be able to get there.

“Nothing like a bit of ignorance to allow you to move ahead.”

The red tape was part of an effort to reform Canada’s initial approach to medical marijuana. In court filings, the government suggested that the old system had become little more than a legal veneer for recreational growers, with a significant amount of marijuana making its way to illegal operations. Health Canada said users, on average, grew enough marijuana to roll 54 to 90 cigarettes a day, far beyond what they needed for personal use.

“There was big, big diversion going on,” Brent Zettl, the chief executive of Prairie Plant Systems, the company that grew and distributed the government-supplied marijuana under the old system. The company is now among the newly approved growers. “They ducked behind legitimate patients and used them,” he said.