The best punishment for rapists
It is not physical castration, because fantasies - violent or otherwise - arise in the mind/brain. Women can be raped - to grievous effect, as witness the poor 23-year-old victim's injuries caused by an iron rod - with things other than a penis. Since rape is about power/anger/revenge, castrating a rapist is no guarantee at all that he would stop harming women. The bottomline is, the penis, for all its reputation as a "fearsome weapon" (ha) does not cause a man to rape.
It is not chemical castration, because see above. Also, as far as I know, there's no single dose of any medicine for life - it's an ongoing process and has to be taken willingly by the man. Not bloody likely, is it, especially if he's out in the world as a "functioning" person?
It is not - up to a point - execution (this in my opinion), because it's too easy a way out for the rapist.
Imprisonment, however, IS just the ticket, in my opinion. I personally think all rapists should suffer all their natural life long, the way their victims have to suffer. Solitary confinement for life, with no interaction whatsoever with anyone at all, ever. If they go mad, so be it. I'm sure plenty of people would be willing to pay a little extra tax to ensure that the cost of subsidising the rapists' stay in prison is met. I know I would. Besides, all they would ever need is just enough food to keep them alive, and none of it is required to be the finest quality organic food prepared by 5-star chefs.
Murder may or may not be deliberate and may even have mitigating circumstances. But rape can never happen by accident or be committed as a "mistake" - it's always a deliberate act committed by the physically stronger on the physically weaker. It's the one crime that's never, ever forgivable.