HIT-SCIR / pyltp

pyltp: the python extension for LTP
1.53k stars 353 forks source link

error: command 'clang++' failed with exit status 1 #167

Closed lihz6 closed 6 years ago

lihz6 commented 6 years ago

问题类型

构建失败

出错场景

macOS 安装 pip3 install pyltp.

代码片段

/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m/object.h:684:33: note: expanded from macro 'PyType_HasFeature'

define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0)

                            ^

1 error generated. error: command 'clang++' failed with exit status 1

如何复现这一错误

macOS 10.13.5 安装 pyltp.

运行环境

macOS 10.13.5; Python 3.7.0

lihz6 commented 6 years ago

不支持 Python 3.7, 降级到 3.6 成功。

brew 安装旧版本参考: https://remarkablemark.org/blog/2017/02/03/install-brew-package-version/