explosion / spaCy

💫 Industrial-strength Natural Language Processing (NLP) in Python
https://spacy.io
MIT License
30.15k stars 4.4k forks source link

spacy==3.8.0 depends on en-core-web-sm==3.7.1 depends on spacy<3.8.0 #13629

Closed alexei closed 1 month ago

alexei commented 1 month ago

spacy==3.8.0 uses en-core-web-sm==3.7.1, but the en-core-web-sm==3.7.1 package is incompatible with spacy==3.8.0:

$ python -m spacy download en_core_web_sm
Collecting en-core-web-sm==3.7.1
...

But:

pip install spacy==3.8.0 https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.7.1/en_core_web_sm-3.7.1-py3-none-any.whl
ERROR: Cannot install en-core-web-sm==3.7.1 and spacy==3.8.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested spacy==3.8.0
    en-core-web-sm 3.7.1 depends on spacy<3.8.0 and >=3.7.2
alexei commented 1 month ago

It's worse, actually: running python -m spacy download en_core_web_sm under spacy==3.8.0 actually replaces spacy==3.8.0 with an earlier, compatible, version:

$ pip install spacy==3.8.0

Installing collected packages: cymem, wrapt, wasabi, urllib3, typing-extensions, tqdm, spacy-loggers, spacy-legacy, shellingham, setuptools, pygments, packaging, numpy, murmurhash, mdurl, MarkupSafe, idna, cloudpathlib, click, charset-normalizer, certifi, catalogue, annotated-types, srsly, smart-open, requests, pydantic-core, preshed, markdown-it-py, marisa-trie, jinja2, blis, rich, pydantic, language-data, typer, langcodes, confection, weasel, thinc, spacy
Successfully installed MarkupSafe-2.1.5 annotated-types-0.7.0 blis-0.7.11 catalogue-2.0.10 certifi-2024.8.30 charset-normalizer-3.3.2 click-8.1.7 cloudpathlib-0.19.0 confection-0.1.5 cymem-2.0.8 idna-3.10 jinja2-3.1.4 langcodes-3.4.0 language-data-1.2.0 marisa-trie-1.2.0 markdown-it-py-3.0.0 mdurl-0.1.2 murmurhash-1.0.10 numpy-1.26.4 packaging-24.1 preshed-3.0.9 pydantic-2.9.2 pydantic-core-2.23.4 pygments-2.18.0 requests-2.32.3 rich-13.8.1 setuptools-75.1.0 shellingham-1.5.4 smart-open-7.0.4 spacy-3.8.0 spacy-legacy-3.0.12 spacy-loggers-1.0.5 srsly-2.4.8 thinc-8.2.5 tqdm-4.66.5 typer-0.12.5 typing-extensions-4.12.2 urllib3-2.2.3 wasabi-1.1.3 weasel-0.4.1 wrapt-1.16.0

$ python -m spacy info --markdown

## Info about spaCy

- **spaCy version:** 3.8.0
- **Python version:** 3.12.5

$ python -m spacy download en_core_web_sm

Installing collected packages: spacy, en-core-web-sm
  Attempting uninstall: spacy
    Found existing installation: spacy 3.8.0
    Uninstalling spacy-3.8.0:
      Successfully uninstalled spacy-3.8.0
Successfully installed en-core-web-sm-3.7.1 spacy-3.7.6
✔ Download and installation successful
You can now load the package via spacy.load('en_core_web_sm')

$ python -m spacy info --markdown

## Info about spaCy

- **spaCy version:** 3.7.6
- **Python version:** 3.12.5
- **Pipelines:** en_core_web_sm (3.7.1)
honnibal commented 1 month ago

Thanks, I should've replied to this sooner.

I also realised the dependency conflict from v3.8, because the models specify the spaCy version.

I've now published a fixed v3.8, and an updated set of models that don't depend on the spaCy version. Please reopen or re-report if you have continued problems.

github-actions[bot] commented 1 week ago

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.