我正在尝试在macOS Sierra上编译spaCy。我刚刚安装了XCode,我的gcc --version
显示了这个:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
安装要求可以正常工作,但是运行python setup.py build_ext --inplace
会给我这个错误:
Obtaining file://~/code/spaCy
Complete output from command python setup.py egg_info:
[Errno 2] No such file or directory: '~/code/spaCy/spacy/cfile.pyx'
Processing cfile.pyx
Traceback (most recent call last):
File "~/code/spaCy/bin/cythonize.py", line 157, in <module>
run(args.root)
File "~/code/spaCy/bin/cythonize.py", line 148, in run
process(base, filename, db)
File "~/code/spaCy/bin/cythonize.py", line 114, in process
preserve_cwd(base, process_pyx, root + '.pyx', root + '.cpp')
File "~/code/spaCy/bin/cythonize.py", line 79, in preserve_cwd
func(*args)
File "~/code/spaCy/bin/cythonize.py", line 61, in process_pyx
raise Exception('Cython failed')
Exception: Cython failed
Cythonizing sources
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "~/code/spaCy/setup.py", line 227, in <module>
setup_package()
File "~/code/spaCy/setup.py", line 172, in setup_package
generate_cython(root, 'spacy')
File "~/code/spaCy/setup.py", line 104, in generate_cython
raise RuntimeError('Running cythonize failed')
RuntimeError: Running cythonize failed
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in ~/code/spaCy/
有一种简单的方法可以调试吗?或者我错过了一些配置步骤?