No person shall manufacture, compound, mix, cultivate, grow or by any other process produce or prepare narcotic drugs, and no person as a wholesaler shall supply the same, without having first obtained a license so to do from the state board of pharmacy. However, the provisions of this section shall not apply to the dispensing, administration, giving away, mixing or otherwise preparing any of such drugs by a registered physician, dentist or veterinarian in the course of his professional practice, where said drugs are dispensed, administered, given away, mixed or otherwise prepared for legitimate medical purposes.