centre-for-humanities-computing / DaCy

DaCy: The State of the Art Danish NLP pipeline using SpaCy
https://centre-for-humanities-computing.github.io/DaCy/
Apache License 2.0
93 stars 20 forks source link

DaCy installation fails #292

Open victorvadmandjensen opened 2 days ago

victorvadmandjensen commented 2 days ago

How to reproduce the behaviour

I have tried to install DaCy using the Powershell Prompt (0.0.1) using the Anaconda Navigator. Writing "pip install dacy" in the Powershell Prompt, my PC tries to install DaCy - an error occurs when the installation starts "Building wheel for spacy-experimental". Specifically, my installation process and subsequent error looks like this:

Collecting dacy
  Using cached dacy-2.7.8-py3-none-any.whl.metadata (21 kB)
Collecting spacy-wrap>=1.4.1 (from dacy)
  Using cached spacy_wrap-1.4.5-py3-none-any.whl.metadata (4.1 kB)
Collecting spacy-experimental>=0.6.2 (from dacy)
  Using cached spacy-experimental-0.6.4.tar.gz (59 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: spacy>=3.2.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy[transformers]>=3.2.0->dacy) (3.7.2)
Requirement already satisfied: pandas>=1.0.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from dacy) (2.2.2)
Requirement already satisfied: tqdm>=4.42.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from dacy) (4.66.5)
Requirement already satisfied: numpy>=1.26.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from pandas>=1.0.0->dacy) (1.26.4)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from pandas>=1.0.0->dacy) (2.9.0.post0)
Requirement already satisfied: pytz>=2020.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from pandas>=1.0.0->dacy) (2024.1)
Requirement already satisfied: tzdata>=2022.7 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from pandas>=1.0.0->dacy) (2023.3)
Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.11 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (3.0.12)
Requirement already satisfied: spacy-loggers<2.0.0,>=1.0.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (1.0.4)
Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (1.0.7)
Requirement already satisfied: cymem<2.1.0,>=2.0.2 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (2.0.6)
Requirement already satisfied: preshed<3.1.0,>=3.0.2 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (3.0.6)
Requirement already satisfied: thinc<8.3.0,>=8.1.8 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (8.2.2)
Requirement already satisfied: wasabi<1.2.0,>=0.9.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (0.9.1)
Requirement already satisfied: srsly<3.0.0,>=2.4.3 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (2.4.8)
Requirement already satisfied: catalogue<2.1.0,>=2.0.6 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (2.0.10)
Requirement already satisfied: weasel<0.4.0,>=0.1.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (0.3.4)
Requirement already satisfied: typer<0.10.0,>=0.3.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (0.9.0)
Requirement already satisfied: smart-open<7.0.0,>=5.2.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (5.2.1)
Requirement already satisfied: requests<3.0.0,>=2.13.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (2.32.3)
Requirement already satisfied: pydantic!=1.8,!=1.8.1,<3.0.0,>=1.7.4 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (2.8.2)
Requirement already satisfied: jinja2 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (3.1.4)
Requirement already satisfied: setuptools in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (75.1.0)
Requirement already satisfied: packaging>=20.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (24.1)
Requirement already satisfied: langcodes<4.0.0,>=3.2.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (3.3.0)
Collecting spacy-transformers>=1.2.1 (from spacy-wrap>=1.4.1->dacy)
  Using cached spacy_transformers-1.3.5-cp312-cp312-win_amd64.whl.metadata (7.2 kB)
Requirement already satisfied: colorama in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from tqdm>=4.42.1->dacy) (0.4.6)
Requirement already satisfied: annotated-types>=0.4.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from pydantic!=1.8,!=1.8.1,<3.0.0,>=1.7.4->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (0.6.0)
Requirement already satisfied: pydantic-core==2.20.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from pydantic!=1.8,!=1.8.1,<3.0.0,>=1.7.4->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (2.20.1)
Requirement already satisfied: typing-extensions>=4.6.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from pydantic!=1.8,!=1.8.1,<3.0.0,>=1.7.4->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (4.11.0)
Requirement already satisfied: six>=1.5 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from python-dateutil>=2.8.2->pandas>=1.0.0->dacy) (1.16.0)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from requests<3.0.0,>=2.13.0->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from requests<3.0.0,>=2.13.0->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from requests<3.0.0,>=2.13.0->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (2.2.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from requests<3.0.0,>=2.13.0->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (2024.8.30)
Collecting transformers<4.37.0,>=3.4.0 (from spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy)
  Using cached transformers-4.36.2-py3-none-any.whl.metadata (126 kB)
Requirement already satisfied: torch>=1.8.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy) (2.5.1)
Collecting spacy-alignments<1.0.0,>=0.7.2 (from spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy)
  Using cached spacy_alignments-0.9.1-cp312-cp312-win_amd64.whl.metadata (2.7 kB)
Requirement already satisfied: blis<0.8.0,>=0.7.8 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from thinc<8.3.0,>=8.1.8->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (0.7.11)
Requirement already satisfied: confection<1.0.0,>=0.0.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from thinc<8.3.0,>=8.1.8->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (0.1.4)
Requirement already satisfied: click<9.0.0,>=7.1.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from typer<0.10.0,>=0.3.0->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (8.1.7)
Requirement already satisfied: cloudpathlib<0.17.0,>=0.7.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from weasel<0.4.0,>=0.1.0->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (0.16.0)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from jinja2->spacy>=3.2.0->spacy[transformers]>=3.2.0->dacy) (2.1.3)
Requirement already satisfied: filelock in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from torch>=1.8.0->spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy) (3.13.1)
Requirement already satisfied: networkx in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from torch>=1.8.0->spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy) (3.3)
Requirement already satisfied: fsspec in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from torch>=1.8.0->spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy) (2024.6.1)
Requirement already satisfied: sympy==1.13.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from torch>=1.8.0->spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy) (1.13.1)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from sympy==1.13.1->torch>=1.8.0->spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy) (1.3.0)
Requirement already satisfied: huggingface-hub<1.0,>=0.19.3 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from transformers<4.37.0,>=3.4.0->spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy) (0.26.2)
Requirement already satisfied: pyyaml>=5.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from transformers<4.37.0,>=3.4.0->spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy) (6.0.1)
Requirement already satisfied: regex!=2019.12.17 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from transformers<4.37.0,>=3.4.0->spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy) (2024.9.11)
Collecting tokenizers<0.19,>=0.14 (from transformers<4.37.0,>=3.4.0->spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy)
  Using cached tokenizers-0.15.2-cp312-none-win_amd64.whl.metadata (6.8 kB)
Requirement already satisfied: safetensors>=0.3.1 in c:\users\au779167\appdata\local\anaconda3\lib\site-packages (from transformers<4.37.0,>=3.4.0->spacy-transformers>=1.2.1->spacy-wrap>=1.4.1->dacy) (0.4.5)
Using cached dacy-2.7.8-py3-none-any.whl (54 kB)
Using cached spacy_wrap-1.4.5-py3-none-any.whl (20 kB)
Using cached spacy_transformers-1.3.5-cp312-cp312-win_amd64.whl (342 kB)
Using cached spacy_alignments-0.9.1-cp312-cp312-win_amd64.whl (187 kB)
Using cached transformers-4.36.2-py3-none-any.whl (8.2 MB)
Using cached tokenizers-0.15.2-cp312-none-win_amd64.whl (2.2 MB)
Building wheels for collected packages: spacy-experimental
  Building wheel for spacy-experimental (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for spacy-experimental (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [64 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build\lib.win-amd64-cpython-312\spacy_experimental
      copying spacy_experimental\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental
      creating build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      copying spacy_experimental\biaffine_parser\bilinear.py -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      copying spacy_experimental\biaffine_parser\eval.py -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      copying spacy_experimental\biaffine_parser\pairwise_bilinear.py -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      copying spacy_experimental\biaffine_parser\pytorch_bilinear.py -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      copying spacy_experimental\biaffine_parser\pytorch_pairwise_bilinear.py -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      copying spacy_experimental\biaffine_parser\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      creating build\lib.win-amd64-cpython-312\spacy_experimental\char_tokenizer
      copying spacy_experimental\char_tokenizer\char_pretokenizer.py -> build\lib.win-amd64-cpython-312\spacy_experimental\char_tokenizer
      copying spacy_experimental\char_tokenizer\scorers.py -> build\lib.win-amd64-cpython-312\spacy_experimental\char_tokenizer
      copying spacy_experimental\char_tokenizer\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental\char_tokenizer
      creating build\lib.win-amd64-cpython-312\spacy_experimental\coref
      copying spacy_experimental\coref\coref_component.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref
      copying spacy_experimental\coref\coref_model.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref
      copying spacy_experimental\coref\coref_scorer.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref
      copying spacy_experimental\coref\coref_util.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref
      copying spacy_experimental\coref\pytorch_coref_model.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref
      copying spacy_experimental\coref\pytorch_span_resolver_model.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref
      copying spacy_experimental\coref\span_resolver_component.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref
      copying spacy_experimental\coref\span_resolver_model.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref
      copying spacy_experimental\coref\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref
      creating build\lib.win-amd64-cpython-312\spacy_experimental\span_finder
      copying spacy_experimental\span_finder\span_finder_component.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_finder
      copying spacy_experimental\span_finder\span_finder_model.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_finder
      copying spacy_experimental\span_finder\span_finder_suggester.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_finder
      copying spacy_experimental\span_finder\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_finder
      creating build\lib.win-amd64-cpython-312\spacy_experimental\span_suggesters
      copying spacy_experimental\span_suggesters\chunk_suggester.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_suggesters
      copying spacy_experimental\span_suggesters\merge_suggesters.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_suggesters
      copying spacy_experimental\span_suggesters\sentence_suggester.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_suggesters
      copying spacy_experimental\span_suggesters\subtree_suggester.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_suggesters
      copying spacy_experimental\span_suggesters\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_suggesters
      creating build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser\tests
      copying spacy_experimental\biaffine_parser\tests\test_arc_labeler.py -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser\tests
      copying spacy_experimental\biaffine_parser\tests\test_arc_predicter.py -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser\tests
      copying spacy_experimental\biaffine_parser\tests\test_mst.py -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser\tests
      copying spacy_experimental\biaffine_parser\tests\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser\tests
      creating build\lib.win-amd64-cpython-312\spacy_experimental\char_tokenizer\tests
      copying spacy_experimental\char_tokenizer\tests\test_char_tokenizers.py -> build\lib.win-amd64-cpython-312\spacy_experimental\char_tokenizer\tests
      copying spacy_experimental\char_tokenizer\tests\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental\char_tokenizer\tests
      creating build\lib.win-amd64-cpython-312\spacy_experimental\coref\tests
      copying spacy_experimental\coref\tests\test_coref.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref\tests
      copying spacy_experimental\coref\tests\test_span_resolver.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref\tests
      copying spacy_experimental\coref\tests\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental\coref\tests
      creating build\lib.win-amd64-cpython-312\spacy_experimental\span_finder\tests
      copying spacy_experimental\span_finder\tests\test_span_finder.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_finder\tests
      copying spacy_experimental\span_finder\tests\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_finder\tests
      creating build\lib.win-amd64-cpython-312\spacy_experimental\span_suggesters\tests
      copying spacy_experimental\span_suggesters\tests\test_suggesters.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_suggesters\tests
      copying spacy_experimental\span_suggesters\tests\__init__.py -> build\lib.win-amd64-cpython-312\spacy_experimental\span_suggesters\tests
      copying spacy_experimental\biaffine_parser\arc_labeler.pyx -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      copying spacy_experimental\biaffine_parser\arc_predicter.pyx -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      copying spacy_experimental\biaffine_parser\mst.pyx -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      copying spacy_experimental\biaffine_parser\mst.pxd -> build\lib.win-amd64-cpython-312\spacy_experimental\biaffine_parser
      copying spacy_experimental\char_tokenizer\char_ner_tokenizer.pyx -> build\lib.win-amd64-cpython-312\spacy_experimental\char_tokenizer
      copying spacy_experimental\char_tokenizer\char_tagger_tokenizer.pyx -> build\lib.win-amd64-cpython-312\spacy_experimental\char_tokenizer
      running build_ext
      building 'spacy_experimental.biaffine_parser.arc_predicter' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for spacy-experimental
Failed to build spacy-experimental
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (spacy-experimental)

Thus, I am also unable to provide a DaCy version below. Thanks in advance for checking out this issue!

Your Environment

KennethEnevoldsen commented 2 days ago

I think you might need to installing the required c++ build tools. The error message raises this in:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

Let me know if the issue remains after that