huggingface / huggingface/neuralcoref

Installing neuralcoref throws RuntimeError: Running cythonize failed

Open
#328 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
2.9k
Forks
467
PR merge metrics
No merged PRs in 30d

Description

`pip install git+https://github.com/huggingface/neuralcoref.git` throws
```
RuntimeError: Running cythonize failed
Cythonizing sources
```
more details below

Including `pip install cython` before seems to fix it, is this the intended way to install?

My environment:
Python version: `3.7.5`
Pip version: `21.3.1`
uname: Darwin

```
Collecting git+https://github.com/huggingface/neuralcoref.git
Cloning https://github.com/huggingface/neuralcoref.git to /private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo
Running command git clone -q https://github.com/huggingface/neuralcoref.git /private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo
Resolved https://github.com/huggingface/neuralcoref.git to commit 60338df6f9b0a44a6728b442193b7c66653b0731
ERROR: Command errored out with exit status 1:
command: /Users/nsorros/code/test/neural_coref/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/setup.py'"'"'; __file__='"'"'/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-pip-egg-info-uc1rbq7i
cwd: /private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/
Complete output (39 lines):
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'Cython'
Processing neuralcoref.pyx
Traceback (most recent call last):
File "/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/bin/cythonize.py", line 59, in process_pyx
["cython"] + flags + ["-o", tofile, fromfile], env=os.environ
File "/Users/nsorros/.pyenv/versions/3.7.9/lib/python3.7/subprocess.py", line 339, in call
with Popen(*popenargs, **kwargs) as p:
File "/Users/nsorros/.pyenv/versions/3.7.9/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/Users/nsorros/.pyenv/versions/3.7.9/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'cython': 'cython'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/bin/cythonize.py", line 168, in
run(args.root)
File "/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/bin/cythonize.py", line 157, in run
process(base, filename, db)
File "/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/bin/cythonize.py", line 123, in process
preserve_cwd(base, process_pyx, root + ".pyx", root + ".cpp")
File "/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/bin/cythonize.py", line 86, in preserve_cwd
func(*args)
File "/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/bin/cythonize.py", line 77, in process_pyx
raise Exception("Cython failed")
Exception: Cython failed
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/setup.py", line 239, in
setup_package()
File "/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/setup.py", line 174, in setup_package
generate_cython(root, 'neuralcoref')
File "/private/var/folders/f1/x6zj7pg94m3fv0klkqwtjhnm0000gn/T/pip-req-build-azgj9svo/setup.py", line 163, in generate_cython
raise RuntimeError('Running cythonize failed')
RuntimeError: Running cythonize failed
Cythonizing sources
----------------------------------------
WARNING: Discarding git+https://github.com/huggingface/neuralcoref.git. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.