Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: type object 'Callable' has no attribute '_abc_registry' during spacy 2.1.7 update on python 3.7 #4071

Closed
bastbnl opened this issue Aug 2, 2019 · 2 comments
Labels
install Installation issues

Comments

@bastbnl
Copy link

bastbnl commented Aug 2, 2019

How to reproduce the problem

Tried updating to spacy 2.1.7 from a working installation containing spacy 2.1.6 on python 3.7.3.

(env) bastb@bastb-vps:/var/www/brownpapersession/dev/brownpapersession$ TMPDIR=/var/tmp pip install -U --no-binary :all: spacy
...
Collecting spacy
  Downloading https://files.pythonhosted.org/packages/f1/04/f25cdc3cb6d143ef397c23718026aff606c3e558cbd4939e9e4cb0a4b515/spacy-2.1.7.tar.gz (30.7MB)
     |████████████████████████████████| 30.7MB 6.0MB/s
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /var/www/brownpapersession/dev/env/bin/python3.7 /var/www/brownpapersession/dev/env/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /var/tmp/pip-build-env-wkhtgtnf/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- setuptools 'wheel>0.32.0.<0.33.0' Cython 'cymem>=2.0.2,<2.1.0' 'preshed>=2.0.1,<2.1.0' 'murmurhash>=0.28.0,<1.1.0' 'thinc>=7.0.8,<7.1.0'
       cwd: None
  Complete output (24 lines):
  Traceback (most recent call last):
    File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/var/www/brownpapersession/dev/env/lib/python3.7/site-packages/pip/__main__.py", line 16, in <module>
      from pip._internal import main as _main  # isort:skip # noqa
    File "/var/www/brownpapersession/dev/env/lib/python3.7/site-packages/pip/_internal/__init__.py", line 40, in <module>
      from pip._internal.cli.autocompletion import autocomplete
    File "/var/www/brownpapersession/dev/env/lib/python3.7/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
      from pip._internal.cli.main_parser import create_main_parser
    File "/var/www/brownpapersession/dev/env/lib/python3.7/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
      from pip._internal.cli import cmdoptions
    File "/var/www/brownpapersession/dev/env/lib/python3.7/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
      from pip._internal.models.search_scope import SearchScope
    File "/var/www/brownpapersession/dev/env/lib/python3.7/site-packages/pip/_internal/models/search_scope.py", line 11, in <module>
      from pip._internal.utils.misc import normalize_path, redact_password_from_url
    File "/var/www/brownpapersession/dev/env/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 58, in <module>
      from typing import cast, Tuple
    File "/var/www/brownpapersession/dev/env/lib/python3.7/site-packages/typing.py", line 1356, in <module>
      class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
    File "/var/www/brownpapersession/dev/env/lib/python3.7/site-packages/typing.py", line 1004, in __new__
      self._abc_registry = extra._abc_registry
  AttributeError: type object 'Callable' has no attribute '_abc_registry'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /var/www/brownpapersession/dev/env/bin/python3.7 /var/www/brownpapersession/dev/env/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /var/tmp/pip-build-env-wkhtgtnf/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- setuptools 'wheel>0.32.0.<0.33.0' Cython 'cymem>=2.0.2,<2.1.0' 'preshed>=2.0.1,<2.1.0' 'murmurhash>=0.28.0,<1.1.0' 'thinc>=7.0.8,<7.1.0' Check the logs for full command output.

Your Environment

(env) bastb@bastb-vps:/var/www/brownpapersession/dev/brownpapersession$ python -m spacy info

============================== Info about spaCy ==============================

spaCy version    2.1.6
Location         /var/www/brownpapersession/dev/env/lib/python3.7/site-packages/spacy
Platform         Linux-4.9.0-7-amd64-x86_64-with-debian-9.9
Python version   3.7.3
Models           en, nl
@bastbnl
Copy link
Author

bastbnl commented Aug 2, 2019

Looks like uninstall typing fixes the issue:

(env) bastb@bastb-vps:/var/www/brownpapersession/dev/brownpapersession$ pip uninstall typing
Uninstalling typing-3.6.6:
  Would remove:
    /var/www/brownpapersession/dev/env/lib/python3.7/site-packages/typing-3.6.6-py3.7.egg-info
    /var/www/brownpapersession/dev/env/lib/python3.7/site-packages/typing.py
Proceed (y/n)? y
  Successfully uninstalled typing-3.6.6

Reference: ethereum/eth-abi#131

@ines ines added the install Installation issues label Aug 2, 2019
@ines ines closed this as completed Aug 2, 2019
@lock
Copy link

lock bot commented Sep 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
install Installation issues
Projects
None yet
Development

No branches or pull requests

2 participants