The present invention relates to an edible 3D printer filament that incorporates an active ingredient such as an oil (e,g, cannabis) extract for taste, odor or medicinal benefit, and which is capable of retaining this benefit despite the repeated thermal extrusion involved in 3D printing. The filament is made by mixing the active ingredient extraction with polyvinylpyrrolidone (PVP), starch, and super disintegrant, and spray drying the result to a powderized form. The powderized water soluble polymer with active ingredient is mixed with excipient ingredients including a plasticizer, colored/dyed arabic gum, a gelling agent, fillers, flour, a binding or thickening agent (which also gives the benefit of being a stabilizer), a lubricant, and a preservative, and is heated. The result is hot melt extruded into a filament with a diameter of 1.75 mm or 3 mm. When printed, the thermoplastic has good strength, stiffness, and physical properties, and can be 3D-printed in any shape.