relatio-nlp / relatio

code base for constructing narrative statements from text
MIT License
96 stars 27 forks source link

Dependency incompatibilities #100

Open milanschroeder opened 9 months ago

milanschroeder commented 9 months ago

Potentially related to some other issues, installation of version 0.3.0 failed on GoogleColab due to incompatibilities between required packages, with torch versions being the central issue: Successfull installation requires torch==1.12.1 and torch==2.1.0

Trying to install using %pip install relatio fails with: 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. sqlalchemy 2.0.27 requires typing-extensions>=4.6.0, but you have typing-extensions 4.5.0 which is incompatible. en-core-web-sm 3.7.1 requires spacy<3.8.0,>=3.7.2, but you have spacy 3.3.3 which is incompatible. inflect 7.0.0 requires pydantic>=1.9.1, but you have pydantic 1.8.2 which is incompatible. pydantic-core 2.16.2 requires typing-extensions!=4.7.0,>=4.6.0, but you have typing-extensions 4.5.0 which is incompatible. torchaudio 2.1.0+cu121 requires torch==2.1.0, but you have torch 1.12.1 which is incompatible. torchdata 0.7.0 requires torch==2.1.0, but you have torch 1.12.1 which is incompatible. torchtext 0.16.0 requires torch==2.1.0, but you have torch 1.12.1 which is incompatible.

Hence trying to install required versions of dependencis manually: %pip install torch==2.1.0 %pip install typing-extensions<=4.7.0,>=4.6.0 %pip install spacy<3.8.0,>=3.7.2 %pip install pydantic>=1.9.1

After installing torch==2.1.0, however: 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. allennlp 2.10.1 requires torch<1.13.0,>=1.10.0, but you have torch 2.1.0 which is incompatible. allennlp-models 2.10.1 requires torch<1.13.0,>=1.7.0, but you have torch 2.1.0 which is incompatible. torchvision 0.13.1 requires torch==1.12.1, but you have torch 2.1.0 which is incompatible

Hence installs torch==1.12.1, which results in: 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. torchaudio 2.1.0+cu121 requires torch==2.1.0, but you have torch 1.12.1 which is incompatible. torchdata 0.7.0 requires torch==2.1.0, but you have torch 1.12.1 which is incompatible. torchtext 0.16.0 requires torch==2.1.0, but you have torch 1.12.1 which is incompatible.

milanschroeder commented 7 months ago

Works in Colab as long as installation is done like:

%pip` install spacy==3.3.2
%pip install relatio
%pip install spacy==3.7.2

and Preprocessor uses different model, e.g.: p = relatio.Preprocessor(spacy_model = "en_core_web_lg")