@kingu_platypus_gidora More seriously, I think it's different for each country/state.Here are explanations about how to obtain a license for each state legalizing medical or recreative weed:
http://smallbusiness.findlaw.com/business-laws-and-regulations/marijuana-business-licenses-permits-and-planning.html