ImportError: невозможно импортировать имя 'get_distribution' - PullRequest
0 голосов
/ 18 июня 2019

Версия Python: 3.6.8

Версия SpaCy: 2.1.4

Просто попробуйте import spacy:

Traceback (most recent call last):
  File "src/discovery/pipeline/news/news_pipeline.py", line 9, in <module>
    from src.discovery.modules.news.pipeline.auginewspipeline import AugINewsPipeline
  File "/local/apps/discopyusr1/discovery-python/src/discovery/modules/news/pipeline/auginewspipeline.py", line 10, in <module>
    from src.discovery.modules.news.pipeline.feature_extraction.featureextractor import FeatureExtracter
  File "/local/apps/discopyusr1/discovery-python/src/discovery/modules/news/pipeline/feature_extraction/featureextractor.py", line 2, in <module>
    import spacy
  File "/usr/local/lib64/python3.6/site-packages/spacy/__init__.py", line 12, in <module>
    from .cli.info import info as cli_info
  File "/usr/local/lib64/python3.6/site-packages/spacy/cli/__init__.py", line 1, in <module>
    from .download import download  # noqa: F401
  File "/usr/local/lib64/python3.6/site-packages/spacy/cli/download.py", line 11, in <module>
    from .link import link
  File "/usr/local/lib64/python3.6/site-packages/spacy/cli/link.py", line 9, in <module>
    from .. import util
  File "/usr/local/lib64/python3.6/site-packages/spacy/util.py", line 17, in <module>
    from jsonschema import Draft4Validator
  File "/usr/local/lib/python3.6/site-packages/jsonschema/__init__.py", line 32, in <module>
    from pkg_resources import get_distribution
ImportError: cannot import name 'get_distribution'
...