huggingface / neuralcoref

✨Fast Coreference Resolution in spaCy with Neural Networks
https://huggingface.co/coref/
MIT License
2.83k stars 474 forks source link

neuralcoref not supporting python 3.9 version #354

Open subeena opened 1 year ago

extradosages commented 10 months ago

To aid anyone worried about the verisimiltude of this issue or searching for relevant errors: I can attest that this is indeed a problem.

I am on macosx-13.4, with an arm processor.

pip install neuralcoref results in the following error with python >=3.9.

  DEPRECATION: neuralcoref is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  error: subprocess-exited-with-error

  × Running setup.py install for neuralcoref did not run successfully.
  │ exit code: 1
  ╰─> [101 lines of output]
      WARNING: The wheel package is not available.
      running install
      running build
      running build_py
      creating build
      creating build/lib.macosx-13.4-arm64-3.9
      creating build/lib.macosx-13.4-arm64-3.9/neuralcoref
      copying neuralcoref/__init__.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref
      copying neuralcoref/file_utils.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref
      creating build/lib.macosx-13.4-arm64-3.9/neuralcoref/tests
      copying neuralcoref/tests/__init__.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/tests
      copying neuralcoref/tests/test_neuralcoref.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/tests
      creating build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      copying neuralcoref/train/algorithm.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      copying neuralcoref/train/conllparser.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      copying neuralcoref/train/compat.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      copying neuralcoref/train/__init__.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      copying neuralcoref/train/model.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      copying neuralcoref/train/dataset.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      copying neuralcoref/train/utils.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      copying neuralcoref/train/document.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      copying neuralcoref/train/learn.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      copying neuralcoref/train/evaluator.py -> build/lib.macosx-13.4-arm64-3.9/neuralcoref/train
      running build_ext
      building 'neuralcoref.neuralcoref' extension
      creating build/temp.macosx-13.4-arm64-3.9
      creating build/temp.macosx-13.4-arm64-3.9/neuralcoref
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -DOPENSSL_NO_SSL3 -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/sinister/.pyenv/versions/3.9.18/include/python3.9 -I/private/var/folders/4j/ddcjkr1d72z94xmnp_b_3x4h0000gn/T/pip-install-1o1hurh8/neuralcoref_814de23605034680badae61bc9f61cb1/include -I/Users/sinister/.pyenv/versions/3.9.18/include/python3.9 -c neuralcoref/neuralcoref.cpp -o build/temp.macosx-13.4-arm64-3.9/neuralcoref/neuralcoref.o -O2 -Wno-strict-prototypes -Wno-unused-function
      In file included from neuralcoref/neuralcoref.cpp:607:
      In file included from /private/var/folders/4j/ddcjkr1d72z94xmnp_b_3x4h0000gn/T/pip-install-1o1hurh8/neuralcoref_814de23605034680badae61bc9f61cb1/include/numpy/arrayobject.h:15:
      In file included from /private/var/folders/4j/ddcjkr1d72z94xmnp_b_3x4h0000gn/T/pip-install-1o1hurh8/neuralcoref_814de23605034680badae61bc9f61cb1/include/numpy/ndarrayobject.h:17:
      In file included from /private/var/folders/4j/ddcjkr1d72z94xmnp_b_3x4h0000gn/T/pip-install-1o1hurh8/neuralcoref_814de23605034680badae61bc9f61cb1/include/numpy/ndarraytypes.h:1728:
      /private/var/folders/4j/ddcjkr1d72z94xmnp_b_3x4h0000gn/T/pip-install-1o1hurh8/neuralcoref_814de23605034680badae61bc9f61cb1/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"
       ^
      neuralcoref/neuralcoref.cpp:8989:40: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
          __pyx_t_5 = ((__pyx_v_maxchild_idx > __pyx_v_sent_start) != 0);
                        ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
      neuralcoref/neuralcoref.cpp:9046:40: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
          __pyx_t_5 = ((__pyx_v_minchild_idx < (__pyx_v_sent_end - 1)) != 0);
                        ~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~
      neuralcoref/neuralcoref.cpp:49313:54: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref_NeuralCoref.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49340:112: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct____pyx_f_11neuralcoref_11neuralcoref_get_span_type.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49346:71: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_1_genexpr.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49352:76: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_2_get_resolved.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49358:71: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_3_genexpr.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49364:122: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_4___pyx_f_11neuralcoref_11neuralcoref_extract_mentions_spans.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49370:71: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_5_genexpr.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49376:72: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_6___iter__.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49382:77: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_7_set_conv_dict.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49388:71: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_8_genexpr.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49394:68: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_9_pipe.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49400:72: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_10_predict.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49406:72: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_11_genexpr.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49412:72: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_12_genexpr.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49418:72: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_13_genexpr.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49424:72: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_14_genexpr.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49430:72: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_15_to_disk.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49436:74: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_16_from_disk.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      neuralcoref/neuralcoref.cpp:49442:73: error: no member named 'tp_print' in '_typeobject'
        __pyx_type_11neuralcoref_11neuralcoref___pyx_scope_struct_17_to_bytes.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      fatal error: too many errors emitted, stopping now [-ferror-limit=]
      3 warnings and 20 errors generated.
      error: command '/usr/bin/clang' 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.
╰─> neuralcoref

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

[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip

This is likely the same issue as https://github.com/numpy/numpy/issues/17937.