4

所以我正在从源代码编译 spacy。我安装了 cython v23.4。当我pip install -e .spaCy目录中运行时,我得到:`Obtaining file:///home/nitish/spaCy 命令 python setup.py egg_info 的完整输出:

Error compiling Cython file:
------------------------------------------------------------
...
from cymem.cymem cimport Pool
from thinc.typedefs cimport weight_t
^
------------------------------------------------------------

syntax/transition_system.pxd:2:0: 'thinc/typedefs.pxd' not found
Processing gold.pyx
Traceback (most recent call last):
  File "/home/nitish/spaCy/bin/cythonize.py", line 156, in <module>
    run(args.root)
  File "/home/nitish/spaCy/bin/cythonize.py", line 147, in run
    process(base, filename, db)
  File "/home/nitish/spaCy/bin/cythonize.py", line 113, in process
    preserve_cwd(base, process_pyx, root + '.pyx', root + '.cpp')
  File "/home/nitish/spaCy/bin/cythonize.py", line 78, in preserve_cwd
    func(*args)
  File "/home/nitish/spaCy/bin/cythonize.py", line 60, in process_pyx
    raise Exception('Cython failed')
Exception: Cython failed
Cythonizing sources
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/nitish/spaCy/setup.py", line 265, in <module>
    setup_package()
  File "/home/nitish/spaCy/setup.py", line 216, in setup_package
    generate_cython(root, 'spacy')
  File "/home/nitish/spaCy/setup.py", line 148, in generate_cython
    raise RuntimeError('Running cythonize failed')
RuntimeError: Running cythonize failed

`

我该如何纠正?

4

1 回答 1

0

当您从本地存储库安装时,您应该首先安装需求。

pip install -r requirements.txt

来自 spaCy 存储库。

您有使用该-e选项的特定原因吗?如果没有,我建议--user改用。

于 2017-02-01T12:05:51.733 回答