When the water is to be removed, it is sufficient to effect the reaction using an azeotropically dehydratable solvent such as toluene, xylene, methyl isobutyl ketone or the like and a means such as a Dean-Stark tube or the like capable of allowing the reaction to proceed while removing the water from the system, or the like.