“Discourage [someone] from [doing something]” is really the only construction that makes sense.
You could technically use “for” instead of “from” if you want to say that you are discouraging someone *because of* what they’ve done, as in you are scolding them for bad behaviour.