CAMeL-Lab / camel_tools

A suite of Arabic natural language processing tools developed by the CAMeL Lab at New York University Abu Dhabi.
MIT License
415 stars 73 forks source link

[BUG] Installation problem on linux #109

Closed TheProf54 closed 1 year ago

TheProf54 commented 1 year ago

I am receiving a legacy-install-failure when running pip install camel-tools from Terminal.

Ubuntu 22.04.1 LTS Python 3.10.6

(kivy_venv) claudio@pcclaudio:~/KivyApp$ pip install camel-tools Collecting camel-tools Using cached camel_tools-1.2.0-py3-none-any.whl Collecting camel-kenlm Using cached camel-kenlm-2021.12.27.tar.gz (418 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: requests in ./kivy_venv/lib/python3.10/site-packages (from camel-tools) (2.28.1) Requirement already satisfied: numpy in ./kivy_venv/lib/python3.10/site-packages (from camel-tools) (1.24.1) Collecting cachetools Using cached cachetools-5.2.1-py3-none-any.whl (9.3 kB) Collecting torch>=1.3 Using cached torch-1.13.1-cp310-cp310-manylinux1_x86_64.whl (887.5 MB) Collecting scikit-learn Using cached scikit_learn-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.5 MB) Requirement already satisfied: dill in ./kivy_venv/lib/python3.10/site-packages (from camel-tools) (0.3.6) Collecting transformers>=3.0.2 Using cached transformers-4.25.1-py3-none-any.whl (5.8 MB) Requirement already satisfied: editdistance in ./kivy_venv/lib/python3.10/site-packages (from camel-tools) (0.6.2) Requirement already satisfied: six in ./kivy_venv/lib/python3.10/site-packages (from camel-tools) (1.16.0) Requirement already satisfied: pandas in ./kivy_venv/lib/python3.10/site-packages (from camel-tools) (1.5.2) Collecting scipy Using cached scipy-1.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.4 MB) Requirement already satisfied: docopt in ./kivy_venv/lib/python3.10/site-packages (from camel-tools) (0.6.2) Requirement already satisfied: future in ./kivy_venv/lib/python3.10/site-packages (from camel-tools) (0.18.2) Collecting nvidia-cuda-runtime-cu11==11.7.99 Using cached nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB) Requirement already satisfied: typing-extensions in ./kivy_venv/lib/python3.10/site-packages (from torch>=1.3->camel-tools) (4.4.0) Collecting nvidia-cudnn-cu11==8.5.0.96 Using cached nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB) Requirement already satisfied: nvidia-cuda-nvrtc-cu11==11.7.99 in ./kivy_venv/lib/python3.10/site-packages (from torch>=1.3->camel-tools) (11.7.99) Collecting nvidia-cublas-cu11==11.10.3.66 Using cached nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB) Requirement already satisfied: setuptools in ./kivy_venv/lib/python3.10/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch>=1.3->camel-tools) (65.6.3) Requirement already satisfied: wheel in ./kivy_venv/lib/python3.10/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch>=1.3->camel-tools) (0.38.4) Requirement already satisfied: regex!=2019.12.17 in ./kivy_venv/lib/python3.10/site-packages (from transformers>=3.0.2->camel-tools) (2022.10.31) Requirement already satisfied: pyyaml>=5.1 in ./kivy_venv/lib/python3.10/site-packages (from transformers>=3.0.2->camel-tools) (6.0) Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in ./kivy_venv/lib/python3.10/site-packages (from transformers>=3.0.2->camel-tools) (0.13.2) Requirement already satisfied: packaging>=20.0 in ./kivy_venv/lib/python3.10/site-packages (from transformers>=3.0.2->camel-tools) (22.0) Requirement already satisfied: filelock in ./kivy_venv/lib/python3.10/site-packages (from transformers>=3.0.2->camel-tools) (3.8.2) Collecting huggingface-hub<1.0,>=0.10.0 Using cached huggingface_hub-0.11.1-py3-none-any.whl (182 kB) Requirement already satisfied: tqdm>=4.27 in ./kivy_venv/lib/python3.10/site-packages (from transformers>=3.0.2->camel-tools) (4.64.1) Requirement already satisfied: pytz>=2020.1 in ./kivy_venv/lib/python3.10/site-packages (from pandas->camel-tools) (2022.7) Requirement already satisfied: python-dateutil>=2.8.1 in ./kivy_venv/lib/python3.10/site-packages (from pandas->camel-tools) (2.8.2) Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./kivy_venv/lib/python3.10/site-packages (from requests->camel-tools) (1.26.13) Requirement already satisfied: charset-normalizer<3,>=2 in ./kivy_venv/lib/python3.10/site-packages (from requests->camel-tools) (2.1.1) Requirement already satisfied: certifi>=2017.4.17 in ./kivy_venv/lib/python3.10/site-packages (from requests->camel-tools) (2022.12.7) Requirement already satisfied: idna<4,>=2.5 in ./kivy_venv/lib/python3.10/site-packages (from requests->camel-tools) (3.4) Requirement already satisfied: threadpoolctl>=2.0.0 in ./kivy_venv/lib/python3.10/site-packages (from scikit-learn->camel-tools) (3.1.0) Requirement already satisfied: joblib>=1.1.1 in ./kivy_venv/lib/python3.10/site-packages (from scikit-learn->camel-tools) (1.2.0) Building wheels for collected packages: camel-kenlm Building wheel for camel-kenlm (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [49 lines of output] running bdist_wheel running build running build_ext building 'kenlm' extension creating build creating build/temp.linux-x86_64-cpython-310 creating build/temp.linux-x86_64-cpython-310/lm creating build/temp.linux-x86_64-cpython-310/python creating build/temp.linux-x86_64-cpython-310/util creating build/temp.linux-x86_64-cpython-310/util/double-conversion x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/bhiksha.cc -o build/temp.linux-x86_64-cpython-310/lm/bhiksha.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/binary_format.cc -o build/temp.linux-x86_64-cpython-310/lm/binary_format.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB lm/binary_format.cc: In member function ‘void lm::ngram::BinaryFormat::FinishFile(const lm::ngram::Config&, lm::ngram::ModelType, unsigned int, const std::vector&)’: lm/binary_format.cc:261:9: warning: ‘void memset(void, int, size_t)’ clearing an object of type ‘struct lm::ngram::Parameters’ with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] 261 | memset(&params, 0, sizeof(Parameters)); | ~~^~~~~~~~ In file included from lm/binary_format.cc:1: lm/binary_format.hh:42:8: note: ‘struct lm::ngram::Parameters’ declared here 42 | struct Parameters { | ^~~~~~ x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/config.cc -o build/temp.linux-x86_64-cpython-310/lm/config.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/lm_exception.cc -o build/temp.linux-x86_64-cpython-310/lm/lm_exception.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/model.cc -o build/temp.linux-x86_64-cpython-310/lm/model.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/quantize.cc -o build/temp.linux-x86_64-cpython-310/lm/quantize.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/read_arpa.cc -o build/temp.linux-x86_64-cpython-310/lm/read_arpa.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/search_hashed.cc -o build/temp.linux-x86_64-cpython-310/lm/search_hashed.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/search_trie.cc -o build/temp.linux-x86_64-cpython-310/lm/search_trie.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/sizes.cc -o build/temp.linux-x86_64-cpython-310/lm/sizes.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/trie.cc -o build/temp.linux-x86_64-cpython-310/lm/trie.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/trie_sort.cc -o build/temp.linux-x86_64-cpython-310/lm/trie_sort.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/value_build.cc -o build/temp.linux-x86_64-cpython-310/lm/value_build.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/virtual_interface.cc -o build/temp.linux-x86_64-cpython-310/lm/virtual_interface.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/vocab.cc -o build/temp.linux-x86_64-cpython-310/lm/vocab.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c python/kenlm.cpp -o build/temp.linux-x86_64-cpython-310/python/kenlm.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB python/kenlm.cpp: In function ‘PyObject __Pyx_Coroutine_Send(PyObject, PyObject)’: python/kenlm.cpp:10162:19: error: ‘_PyGen_Send’ was not declared in this scope; did you mean ‘_PyGen_yf’? 10162 | ret = _PyGen_Send((PyGenObject)yf, value == Py_None ? NULL : value); | ^~~ | _PyGen_yf python/kenlm.cpp:10167:19: error: ‘_PyGen_Send’ was not declared in this scope; did you mean ‘_PyGen_yf’? 10167 | ret = _PyGen_Send((PyGenObject)yf, value == Py_None ? NULL : value); | ^~~ | _PyGen_yf python/kenlm.cpp: In function ‘PyObject __Pyx_Generator_Next(PyObject)’: python/kenlm.cpp:10251:19: error: ‘_PyGen_Send’ was not declared in this scope; did you mean ‘_PyGen_yf’? 10251 | ret = _PyGen_Send((PyGenObject)yf, NULL); | ^~~ | _PyGen_yf error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for camel-kenlm Running setup.py clean for camel-kenlm Failed to build camel-kenlm Installing collected packages: camel-kenlm, scipy, nvidia-cuda-runtime-cu11, nvidia-cublas-cu11, cachetools, scikit-learn, nvidia-cudnn-cu11, huggingface-hub, transformers, torch, camel-tools Running setup.py install for camel-kenlm ... error error: subprocess-exited-with-error

× Running setup.py install for camel-kenlm did not run successfully. │ exit code: 1 ╰─> [51 lines of output] running install /home/claudio/KivyApp/kivy_venv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_ext building 'kenlm' extension creating build creating build/temp.linux-x86_64-cpython-310 creating build/temp.linux-x86_64-cpython-310/lm creating build/temp.linux-x86_64-cpython-310/python creating build/temp.linux-x86_64-cpython-310/util creating build/temp.linux-x86_64-cpython-310/util/double-conversion x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/bhiksha.cc -o build/temp.linux-x86_64-cpython-310/lm/bhiksha.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/binary_format.cc -o build/temp.linux-x86_64-cpython-310/lm/binary_format.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB lm/binary_format.cc: In member function ‘void lm::ngram::BinaryFormat::FinishFile(const lm::ngram::Config&, lm::ngram::ModelType, unsigned int, const std::vector&)’: lm/binary_format.cc:261:9: warning: ‘void memset(void, int, size_t)’ clearing an object of type ‘struct lm::ngram::Parameters’ with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] 261 | memset(&params, 0, sizeof(Parameters)); | ~~^~~~~~~~ In file included from lm/binary_format.cc:1: lm/binary_format.hh:42:8: note: ‘struct lm::ngram::Parameters’ declared here 42 | struct Parameters { | ^~~~~~ x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/config.cc -o build/temp.linux-x86_64-cpython-310/lm/config.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/lm_exception.cc -o build/temp.linux-x86_64-cpython-310/lm/lm_exception.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/model.cc -o build/temp.linux-x86_64-cpython-310/lm/model.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/quantize.cc -o build/temp.linux-x86_64-cpython-310/lm/quantize.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/read_arpa.cc -o build/temp.linux-x86_64-cpython-310/lm/read_arpa.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/search_hashed.cc -o build/temp.linux-x86_64-cpython-310/lm/search_hashed.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/search_trie.cc -o build/temp.linux-x86_64-cpython-310/lm/search_trie.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/sizes.cc -o build/temp.linux-x86_64-cpython-310/lm/sizes.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/trie.cc -o build/temp.linux-x86_64-cpython-310/lm/trie.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/trie_sort.cc -o build/temp.linux-x86_64-cpython-310/lm/trie_sort.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/value_build.cc -o build/temp.linux-x86_64-cpython-310/lm/value_build.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/virtual_interface.cc -o build/temp.linux-x86_64-cpython-310/lm/virtual_interface.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c lm/vocab.cc -o build/temp.linux-x86_64-cpython-310/lm/vocab.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/home/claudio/KivyApp/kivy_venv/include -I/usr/include/python3.10 -c python/kenlm.cpp -o build/temp.linux-x86_64-cpython-310/python/kenlm.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_XZLIB python/kenlm.cpp: In function ‘PyObject __Pyx_Coroutine_Send(PyObject, PyObject)’: python/kenlm.cpp:10162:19: error: ‘_PyGen_Send’ was not declared in this scope; did you mean ‘_PyGen_yf’? 10162 | ret = _PyGen_Send((PyGenObject)yf, value == Py_None ? NULL : value); | ^~~ | _PyGen_yf python/kenlm.cpp:10167:19: error: ‘_PyGen_Send’ was not declared in this scope; did you mean ‘_PyGen_yf’? 10167 | ret = _PyGen_Send((PyGenObject)yf, value == Py_None ? NULL : value); | ^~~ | _PyGen_yf python/kenlm.cpp: In function ‘PyObject __Pyx_Generator_Next(PyObject)’: python/kenlm.cpp:10251:19: error: ‘_PyGen_Send’ was not declared in this scope; did you mean ‘_PyGen_yf’? 10251 | ret = _PyGen_Send((PyGenObject)yf, NULL); | ^~~ | _PyGen_yf error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> camel-kenlm

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

can someone help me?

bodasadallah commented 1 year ago

I had the same problem, it got solved when I used python 3.9. The problem happened with python 3.10 , and python 3.11 for me.

TheProf54 commented 1 year ago

Thanks a lot, I'll try with a python downgrade

owo commented 1 year ago

Yes, unfortunately we currently only support Python 3.7-3.9. We are working on support for 3.10+.