Lima's a dump but if you have to stay then there's several walls (one mainly roped, one bouldering I understand - I haven't been able to go to either). I understand that there's some day trip sport climbing near Lima which the locals at the walls can tell you about.
If you can get to Cusco, there's a great and very friendly little bouldering room in the basement of El Colessio Cerrado (a covered sports hall near the University). Google 'climbing wall Cusco' and you should find 7a Escalada or some such.
There's also three crags in the hills above Cusco and one permitted bouldering venue (and one in Zona X where you might get asked to move on - see my profile pic). The crags are hard to find so you'd need to hook up with a local or someone who's been before.
The best climbing is at the amazing Pitumaca (Chacco Huayllasca) about three hours travel from Cusco. But you'd need gear and the logistics are more complex (including partners and where to stay - in Pitumarca is best).
Even if you don't have gear for climbing, there are some nice walks in the hills above Cusco around Zona X. For example take the Senor Del Huerto combi to its end beyond Huayllacocha and then follow the path down the small valley on the left towards the Temple of the Moon, then either right and down towards Sacsahuaman and down to the centre or straight on down the Inca path to San Blas and the centre. There are also good walks around the Sacred Valley for example from the Chinchero ruins down the valley to the right. Once at the bottom you can take buses back to Cusco.
Otherwise go and do some tourist stuff. South to Paracas, Nazca and Arequipa. Colca Canyon. Etc
I can't wait to get back and go to Pitumarca again. Sport climbing at 4,000m is somewhat harder than Torbryan, Brean and Cheddar!