Python maximum recursion depth exceeded when installing a module

2.2k views Asked by At

I got maximum recursion depth exceeded when installing gcs-oauth2-boto-plugin-1.4 on my mac. I downloaded and unzipped the package, ran sudo python setup.py install under the installation directory, pretty standard stuff that you would do when install a Python module. I was doing it in a virtual environment (virtualenv). I did not encounter any problem while installing it on the original environment. Any help would be greatly appreciated. Thanks a lot!

Edit: I got the same error when trying to install it with pip install gcs-oauth2-boto-plugin==1.4

1

There are 1 answers

2
hspandher On BEST ANSWER

It is a good possibility that there is some bug in source code that is causing infinite loop and recursion limit error. Still, standard recursion limit in python is quite low (2000 I guess), which might cause problems in some cases. Increasing the recursion limit might work.

import sys
sys.setrecursionlimit(10000)

Add this line to install.py of your source code.