You (re-)invent the spell even when taught by a teacher. So a lab text will be created in that case too.
Even when you learn a spell from a teacher,
it is your Wizard’s Sigil that manifests in your
version; you actually invent the spell yourself,
but with constant guidance from the teacher.
Learning Spells from a Teacher is a still lab activity. It allows the magus to create new effects (invent spells). Ergo, lab texts for those spells are created.
A spell known by the enchanter gives similar spell bonus to enchanting that effect into an item. A spell lab text, however, does not provide any benefit to enchanting a similar effect into an item.