Pip安装导致RecursionError

时间:2018-11-02 11:33:34

标签: python pip drizzle

我正在尝试在conda环境中安装名为grizli(https://github.com/gbrammer/grizli/)的软件。在一个步骤中,我必须安装另一个名为drizzle(https://github.com/gbrammer/drizzle.git)的软件。此安装始终会导致RecursionError。如安装说明所述,我运行

pip install git+https://github.com/gbrammer/drizzle.git

导致

Collecting git+https://github.com/gbrammer/drizzle.git 
Cloning https://github.com/gbrammer/drizzle.git to /tmp/pip-req-build-ncjb9u8_
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-ncjb9u8_/setup.py", line 61, in <module>
    cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE)
  File "/tmp/pip-req-build-ncjb9u8_/astropy_helpers/astropy_helpers/setup_helpers.py", line 140, in register_commands
    from .commands.build_sphinx import AstropyBuildSphinx, AstropyBuildDocs
  File "/tmp/pip-req-build-ncjb9u8_/astropy_helpers/astropy_helpers/commands/build_sphinx.py", line 16, in <module>
    from sphinx.setup_command import BuildDoc as SphinxBuildDoc
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinx/setup_command.py", line 23, in <module>
    from sphinx.application import Sphinx
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinx/application.py", line 34, in <module>
    from sphinx.environment import BuildEnvironment
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 38, in <module>
    from sphinx.util.websupport import is_commentable
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinx/util/websupport.py", line 11, in <module>
    from sphinxcontrib.websupport.utils import is_commentable  # NOQA
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinxcontrib/websupport/__init__.py", line 15, in <module>
    from sphinxcontrib.websupport.core import WebSupport  # NOQA
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinxcontrib/websupport/core.py", line 17, in <module>
    from jinja2 import Environment, FileSystemLoader
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/jinja2/environment.py", line 15, in <module>
    from jinja2 import nodes
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/jinja2/nodes.py", line 19, in <module>
    from jinja2.utils import Markup
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/jinja2/utils.py", line 486, in <module>
    MutableMapping.register(LRUCache)
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/abc.py", line 158, in register
    if issubclass(subclass, cls):
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/abc.py", line 209, in __subclasscheck__
    ok = cls.__subclasshook__(subclass)
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 884, in __extrahook__
    if issubclass(subclass, scls):
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 1154, in __subclasscheck__
    return super().__subclasscheck__(cls)
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/abc.py", line 209, in __subclasscheck__
    ok = cls.__subclasshook__(subclass)
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 884, in __extrahook__
    if issubclass(subclass, scls):
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 1154, in __subclasscheck__
    return super().__subclasscheck__(cls)
  ...
  ...
  ...
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/abc.py", line 209, in __subclasscheck__
    ok = cls.__subclasshook__(subclass)
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 884, in __extrahook__
    if issubclass(subclass, scls):
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 1154, in __subclasscheck__
    return super().__subclasscheck__(cls)
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/abc.py", line 209, in __subclasscheck__
    ok = cls.__subclasshook__(subclass)
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 884, in __extrahook__
    if issubclass(subclass, scls):
  File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 1154, in __subclasscheck__
    return super().__subclasscheck__(cls)
RecursionError: maximum recursion depth exceeded while calling a Python object

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-ncjb9u8_/

代码中的三点代表总是以相同顺序出现并可能导致RecursionError的三行的重复。

我已经尝试了不同的pip版本,但没有任何改变。有人有主意吗?

1 个答案:

答案 0 :(得分:0)

我刚遇到同样的问题。唯一适用于我的解决方案是将狮身人面像的版本降级为<= 1.5.6,如此处所述:https://github.com/ericmandel/pyds9/issues/53(请注意,当我遇到问题时,我已经有astro-helpers> = 2.0了,所以解决方案是在降低狮身人面像上 只需执行以下操作即可:pip install sphinx == 1.5.6 然后希望毛毛雨将正确安装。