What's its previous defecation history? How long has it been since it last defecated?
Sometimes snakes will not defecate for a while. I don't know why this is. You can encourage it to relieve itself by letting it crawl around outside on some grass or by swimming it in a warm bath.
Stewart