Question: The voltage generated in the transformer must be due to the change in the flux in the coils, but if the voltage is DC, why is no voltage induced?

Of course, we know that voltage is created by the derivative of flux, but what does it mean?

Answer: 
The reason we cannot use a transformer at DC is that a DC voltage would cause a linearly increasing flux in the core: \$\Phi\sim\frac{\mathrm d V}{\mathrm d t}\$. In reality, the core will [saturate](https://en.wikipedia.org/wiki/Saturation_(magnetic)) quickly, and the flux stops increasing. Then, also the current in the primary coil reaches a limit by the DC resistance of the winding.
> 
> *but if the voltage is DC, why is no voltage induced?*
> 
> 
> 

It's all a matter of timing, idealities, definitions and perspective.

If you take a regular AC mains transformer of primary inductance circa 10 henry and turns ratio (say) 10:1 then, apply 1 volt to the primary terminals, you will see 0.1 volts induced across across the secondary terminals. This might last for a second or two but, then erodes to zero.

If the transformer was ideal (except for its primary inductance of 10 henry) then you might see 0.1 volts induced across the secondary for maybe 20 seconds or more but then, that voltage erodes to nothing due to the primary current becoming so high (2 amps or more) that the input 1 volt DC supply goes into current limit.

* Can you accept a steady voltage that lasts maybe up to 20 seconds is DC?
* Can you accept that a non-ideal transformer might only produce DC for a couple of seconds?