TT #174 · Parashas Shoftim · Fourth Aliyah · Passuk 18:11
Or a charmer of charms, or one who inquires of a ghost or a familiar spirit, or one who seeks the dead.
Torah Temimah points to Sanhedrin 65b.
TT lemma: וְשֹׁאֵל אוֹב.
English: ‘One who inquires of a ghost’ – this is one who raises the dead by means of a known rite.
Derash defining inquiry of the dead (Bavli) — the practice is identified with a specific forbidden rite.
Inquiring of a ghost (ov) by raising the dead is a capital prohibition.