spacy.gold missing

Installation of spacy==3.2.2 appears to be good (as in, I never had problems before) but now I continue to have the issue that spacy-pytorch-transformers requires spacy.gold

PS: I re-installed everything in a clean, new venv, and the result remains the same

best,

Andreas

Installing collected packages: spacy
  Attempting uninstall: spacy
    Found existing installation: spacy 3.2.2
    Uninstalling spacy-3.2.2:
      Successfully uninstalled spacy-3.2.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
spacy-stanza 0.2.4 requires spacy<3.0.0,>=2.1.0, but you have spacy 3.2.0 which is incompatible.
spacy-sentence-bert 0.0.4 requires spacy<2.4.0,>=2.3.0, but you have spacy 3.2.0 which is incompatible.
spacy-pytorch-transformers 0.4.0 requires spacy<2.2.0,>=2.1.7, but you have spacy 3.2.0 which is incompatible.
spacy-pytorch-transformers 0.4.0 requires srsly<1.1.0,>=0.0.7, but you have srsly 2.4.2 which is incompatible.
sense2vec 1.0.2 requires spacy<3.0.0,>=2.2.3, but you have spacy 3.2.0 which is incompatible.

that, when running the code,

import spacy 
import re
nlp = spacy.load("en_core_web_sm")
import nltk
from spacy import displacy

gives me

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-513d118099ec> in <module>

...

~/.local/lib/python3.8/site-packages/spacy_pytorch_transformers/__init__.py in <module>
----> 1 from .language import PyTT_Language
      2 from .pipeline.tok2vec import PyTT_TokenVectorEncoder  # noqa
      3 from .pipeline.textcat import PyTT_TextCategorizer  # noqa
      4 from .pipeline.wordpiecer import PyTT_WordPiecer  # noqa
      5 from .model_registry import register_model, get_model_function  # noqa

~/.local/lib/python3.8/site-packages/spacy_pytorch_transformers/language.py in <module>
      2 from spacy.tokens import Doc, Span, Token
      3 from spacy.util import get_lang_class
----> 4 from spacy.gold import GoldParse
      5 
      6 from .util import is_special_token

ModuleNotFoundError: No module named 'spacy.gold'

I think you want spacy-transformers, not spacy-pytorch-transformers? That package is really old, from back in the day when transformers was still called pytorch-transformers. As the installation logs show, that old package is not compatible with spaCy v3.x.

Hi Ines,

solved the problem, thanks