Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Maximum recursion depth exceeded during pip install #319

Closed
josePhoenix opened this issue Jun 20, 2017 · 5 comments
Closed

Maximum recursion depth exceeded during pip install #319

josePhoenix opened this issue Jun 20, 2017 · 5 comments

Comments

@josePhoenix
Copy link

First I found sphinx-doc/sphinx#3766, which led me to #302, which has been closed, hence this issue. I can't install photutils in Python 3 using pip.

$ pip3 install photutils
Collecting photutils
  Using cached photutils-0.3.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/2t/m92rpkyn2ps064ffwv0qxrbm0001dr/T/pip-build-5mo1kw4q/photutils/setup.py", line 18, in <module>
        from astropy_helpers.setup_helpers import (
      File "/private/var/folders/2t/m92rpkyn2ps064ffwv0qxrbm0001dr/T/pip-build-5mo1kw4q/photutils/.eggs/astropy_helpers-0.4.8-py3.6.egg/astropy_helpers/setup_helpers.py", line 56, in <module>
        from sphinx.setup_command import BuildDoc as SphinxBuildDoc
      File "/Users/jlong/lib/python3.6/site-packages/sphinx/setup_command.py", line 23, in <module>
        from sphinx.application import Sphinx
      File "/Users/jlong/lib/python3.6/site-packages/sphinx/application.py", line 33, in <module>
        from sphinx.environment import BuildEnvironment
      File "/Users/jlong/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 45, in <module>
        from sphinx.util.websupport import is_commentable
      File "/Users/jlong/lib/python3.6/site-packages/sphinx/util/websupport.py", line 11, in <module>
        from sphinxcontrib.websupport.utils import is_commentable  # NOQA
      File "/Users/jlong/lib/python3.6/site-packages/sphinxcontrib/websupport/__init__.py", line 15, in <module>
        from sphinxcontrib.websupport.core import WebSupport  # NOQA
      File "/Users/jlong/lib/python3.6/site-packages/sphinxcontrib/websupport/core.py", line 17, in <module>
        from jinja2 import Environment, FileSystemLoader
      File "/Users/jlong/lib/python3.6/site-packages/jinja2/__init__.py", line 33, in <module>
        from jinja2.environment import Environment, Template
      File "/Users/jlong/lib/python3.6/site-packages/jinja2/environment.py", line 15, in <module>
        from jinja2 import nodes
      File "/Users/jlong/lib/python3.6/site-packages/jinja2/nodes.py", line 19, in <module>
        from jinja2.utils import Markup
      File "/Users/jlong/lib/python3.6/site-packages/jinja2/utils.py", line 486, in <module>
        MutableMapping.register(LRUCache)
      File "/Users/jlong/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/abc.py", line 158, in register
        if issubclass(subclass, cls):
      File "/Users/jlong/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/abc.py", line 226, in __subclasscheck__
        if issubclass(subclass, scls):
      File "/Users/jlong/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/abc.py", line 226, in __subclasscheck__
        if issubclass(subclass, scls):
      File "/Users/jlong/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/typing.py", line 1145, in __subclasscheck__
        return super().__subclasscheck__(cls)
      File "/Users/jlong/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/abc.py", line 207, in __subclasscheck__
        ok = cls.__subclasshook__(subclass)
      File "/Users/jlong/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/typing.py", line 877, in __extrahook__
        if issubclass(subclass, scls):
      File "/Users/jlong/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/typing.py", line 1145, in __subclasscheck__
        return super().__subclasscheck__(cls)
      File "/Users/jlong/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/abc.py", line 207, in __subclasscheck__
        ok = cls.__subclasshook__(subclass)
      File "/Users/jlong/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/typing.py", line 877, in __extrahook__
        if issubclass(subclass, scls):

... a few hundred lines omitted ...

File "/Users/jlong/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/abc.py", line 197, in __subclasscheck__
        if subclass in cls._abc_cache:
    RecursionError: maximum recursion depth exceeded while calling a Python object

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/2t/m92rpkyn2ps064ffwv0qxrbm0001dr/T/pip-build-5mo1kw4q/photutils/
@pllim
Copy link
Member

pllim commented Jun 20, 2017

Did #318 somehow introduced circular import?

@bsipocz
Copy link
Member

bsipocz commented Jun 20, 2017

For now, I would suggest to downgrade sphinx to 1.5.6 and try to install it then.

The new 2.0 helpers should solve this issue though, and will be included in the new photutils 0.4 (astropy/photutils#552).

@josePhoenix
Copy link
Author

pip3 install Sphinx==1.5.6 and pip3 install photutils works.

@bsipocz
Copy link
Member

bsipocz commented Jun 20, 2017

@pllim - #318 it just did the same we do with some other modules to avoid setuptools' run_setup to mess up things. I'm still testing whether it is sufficient, but so far it appears so.

Obviously, we can't help package versions retrospect to become compatible with new upstream dependencies (e.g. with sphinx 1.6+ and it's dependencies) even though these install issues are rather annoying ones.

@Russell-Jones-OxPhys
Copy link

See also sphinx-doc/sphinx#3976

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants