Closed iris-lux closed 3 years ago
Happens to me, too -- if I use spacy==3.0.3
; It installs fine with spacy==2.3.5
, though.
Hi! There is not a neuralcoref version compatible with spaCy 3.0.3 yet - but it's on the roadmap. Closing this issue and merging it with https://github.com/huggingface/neuralcoref/issues/295
I am using spacy 2.3.5 and also encountered this error.
NeuralCoref hasn't had a release in a while, and the latest wheels only support up to Python 3.7.
I fixed this problem by downgrading python from 3.9
to 3.8
I found this answer on stackoverflow :
The
tp_print
method was removed from the API in Python 3.9. Error "'tp_print': is not a member of '_typeobject'" means that the code is intended for Python <= 3.8.
I'm using colab and had the same issue. I solved by running sudo apt-get install python3.7-dev
. I downgraded to python3.7 but was missing this package.
I found the error by check the logs by running pip install neuralcoref --log log.txt
. I also had to install the package from the source.
FWIW spaCy has experimental support for coreference resolution now. It might be better to just use that, since this doesn't appear to be updated anymore.
For me installation worked for: python: 3.8.0 spacy==3.7.5 neuralcoref==4.0
Whenever I attempt to pip install neuralcoref, I get an error and it does not install.
Here's what it looks like:
Installing collected packages: neuralcoref Running setup.py install for neuralcoref ... error ERROR: Command errored out with exit status 1: command: nc-test/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-install-_3bporz4/neuralcoref_9e8c82c8e14145d3a2660bcc4b5aa271/setup.py'"'"'; file='"'"'/private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-install-_3bporz4/neuralcoref_9e8c82c8e14145d3a2660bcc4b5aa271/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-record-v2_f80dd/install-record.txt --single-version-externally-managed --compile --install-headers nc-test/venv/include/site/python3.9/neuralcoref cwd: /private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-install-_3bporz4/neuralcoref_9e8c82c8e14145d3a2660bcc4b5aa271/ Complete output (101 lines): WARNING: The wheel package is not available. running install running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.9 creating build/lib.macosx-10.9-x86_64-3.9/neuralcoref copying neuralcoref/init.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref copying neuralcoref/file_utils.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref creating build/lib.macosx-10.9-x86_64-3.9/neuralcoref/tests copying neuralcoref/tests/init.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/tests copying neuralcoref/tests/test_neuralcoref.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/tests creating build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train copying neuralcoref/train/algorithm.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train copying neuralcoref/train/conllparser.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train copying neuralcoref/train/compat.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train copying neuralcoref/train/init.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train copying neuralcoref/train/model.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train copying neuralcoref/train/dataset.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train copying neuralcoref/train/utils.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train copying neuralcoref/train/document.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train copying neuralcoref/train/learn.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train copying neuralcoref/train/evaluator.py -> build/lib.macosx-10.9-x86_64-3.9/neuralcoref/train running build_ext building 'neuralcoref.neuralcoref' extension creating build/temp.macosx-10.9-x86_64-3.9 creating build/temp.macosx-10.9-x86_64-3.9/neuralcoref gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-install-_3bporz4/neuralcoref_9e8c82c8e14145d3a2660bcc4b5aa271/include -I/nc-test/venv/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c neuralcoref/neuralcoref.cpp -o build/temp.macosx-10.9-x86_64-3.9/neuralcoref/neuralcoref.o -O2 -Wno-strict-prototypes -Wno-unused-function -stdlib=libc++ In file included from neuralcoref/neuralcoref.cpp:607: In file included from /private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-install-_3bporz4/neuralcoref_9e8c82c8e14145d3a2660bcc4b5aa271/include/numpy/arrayobject.h:15: In file included from /private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-install-_3bporz4/neuralcoref_9e8c82c8e14145d3a2660bcc4b5aa271/include/numpy/ndarrayobject.h:17: In file included from /private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-install-_3bporz4/neuralcoref_9e8c82c8e14145d3a2660bcc4b5aa271/include/numpy/ndarraytypes.h:1728: /private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-install-_3bporz4/neuralcoref_9e8c82c8e14145d3a2660bcc4b5aa271/include/numpy/npy_deprecated_api.h:11:2: warning: "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
ERROR: Command errored out with exit status 1: nc-test/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-install-_3bporz4/neuralcoref_9e8c82c8e14145d3a2660bcc4b5aa271/setup.py'"'"'; file='"'"'/private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-install-_3bporz4/neuralcoref_9e8c82c8e14145d3a2660bcc4b5aa271/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/tj/6n70l5211nn79y7_5qg1hyq80000gn/T/pip-record-v2_f80dd/install-record.txt --single-version-externally-managed --compile --install-headers nc-test/venv/include/site/python3.9/neuralcoref Check the logs for full command output.