By condensation of 4-hydroxycarbazole (I) with epichlorohydrin (II) by means of NaOH in aqueous dioxane at 40 C to yield 4-(2,3-epoxypropoxy)carbazole (III), followed by treatment with isopropylamine (IV) in refluxing ethanol