Assuming that there is a prison somewhat akin to the one in The Dark Knight Rises, except being nothing more than a cylindrical hole in the earth, how deep would it have to be to make escape attempts less palatable than simply accepting the circumstances of such an incarceration(assuming a better than starvation diet).
It's not really about how deep it is, necessarily, it's about how hard, and risky, it is to climb out. Depth is certainly part of that, every metre of depth increases the risk and the difficulty but the relative roughness of the wall is more important when it comes to forming a barrier. A smooth borehole cut by something like a huge core sample drill would be pretty impassable to a solo climber at only a few metres, but would pose very little risk to the climber, they can't get high enough to injury themselves in a fall, they can't get off the bottom.
Assuming a wall with a texture that allows for a climb: For a free climb I'd opt for something in the 30 metre plus range per this answer on how far you can fall before you are guaranteed dead. Depending on equipment etc... this number could have to go up quite considerably.
The pit could be of the version, you can't fundamentally reach the end. Examples:
A loop, climbing it would mean you would come back to the same place again.
Ever growing, while climbing the exit moves upwards as well at the same or a higher speed. For example if the pit were between two earth crusts that move against each other and create height.
A dream, every time you climb and almost reach the end. You wake up and are back in your prison cell.
If I found out the prison pit was any of these versions I think I would give up. Without trying it myself, in the loop version, I could see a prison inmate climbing upwards from his cell and then after two days see him in an exhausted shape climb up to his cell again.