angelosalatino / cso-classifier

Python library that classifies content from scientific papers with the topics of the Computer Science Ontology (CSO).
https://cso.kmi.open.ac.uk
Apache License 2.0
85 stars 18 forks source link

Error in installing dependencies #14

Open akos326 opened 1 year ago

akos326 commented 1 year ago

I got the following error when installing cso-classifier:

ERROR: Failed building wheel for spacy Building wheel for thinc (pyproject.toml) ... done Created wheel for thinc: filename=thinc-8.0.17-cp311-cp311-linux_x86_64.whl size=2509690 sha256=16782448708920aa8b8bec879f0d1e7042b97bf227bc860d6485e5399c018e80 Stored in directory: /tmp/pip-ephem-wheel-cache-kamc_79q/wheels/b0/1d/5e/36ed7863d65cb226891461dc8a53586a0a226429f943f0e868 Successfully built cso-classifier kneed thinc Failed to build gensim spacy ERROR: Could not build wheels for gensim, spacy, which is required to install pyproject.toml-based projects

Before this there is a long list of messages with stuff like this: copying spacy/lang/sr/lemma_lookup_licence.txt -> build/lib.linux-x86_64-cpython-311/spacy/lang/sr copying spacy/lang/hr/lemma_lookup_license.txt -> build/lib.linux-x86_64-cpython-311/spacy/lang/hr running build_ext building 'spacy.training.example' extension creating build/temp.linux-x86_64-cpython-311 creating build/temp.linux-x86_64-cpython-311/spacy creating build/temp.linux-x86_64-cpython-311/spacy/training x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-build-env-sdiapmvh/overlay/local/lib/python3.11/dist-packages/numpy/core/include -I/usr/include/python3.11 -I/usr/include/python3.11 -c spacy/training/example.cpp -o build/temp.linux-x86_64-cpython-311/spacy/training/example.o -std=c++11 -O2 -Wno-strict-prototypes -Wno-unused-function cc1plus: warning: command-line option ‘-Wno-strict-prototypes’ is valid for C/ObjC but not for C++ In file included from /tmp/pip-build-env-sdiapmvh/overlay/local/lib/python3.11/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1940, from /tmp/pip-build-env-sdiapmvh/overlay/local/lib/python3.11/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /tmp/pip-build-env-sdiapmvh/overlay/local/lib/python3.11/dist-packages/numpy/core/include/numpy/arrayobject.h:5, from spacy/training/example.cpp:792:

I'm using Python 3.11, with Ubuntu 22.04

akos326 commented 1 year ago

It seems that the required gensim 3.8.3 requires Python 3.8. However, the documentation leads me to download the latest version (3.11). Please correct the documentation

angelosalatino commented 1 year ago

Yes, python 3.8 works well. Thanks a lot for testing it.