I am trying to install supervisord on a ubuntu ec2 server. When running easy_install I get the following error:

> easy_install supervisor
...
RuntimeError: maximum recursion depth exceeded

I know how to change the max recursion depth in a python script using sys.setrecursionlimit() but how do I change it for the runtime environment?

link|improve this question
feedback

1 Answer

/usr/bin/easy_install is a python script. Can you not just add a line to set a new value after the import sys line ?

#! /usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==0.6c9','console_scripts','easy_install'
__requires__ = 'setuptools==0.6c9'
import sys
sys.setrecursionlimit(1200)
from pkg_resources import load_entry_point
sys.exit(
   load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()
)
link|improve this answer
I tried that, up to 5000. Is there a limit to how high the limit can be safely set? – Dave Aug 29 '11 at 1:07
I don't know - on the (non EC2 ) Ubuntu systems I have to hand I have to set the value as lw as 50 to see the error you get. – Iain Aug 29 '11 at 8:11
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.