python - 在 Mac 上安装 pylinkgrammar

标签 python cc

我在尝试安装时遇到错误 pylinkgrammar在 Mac 上:

pylinkgrammar/link_grammar_wrap.c:2955:10: fatal error: 'link-grammar/link-includes.h' file     not found

#include <link-grammar/link-includes.h>


1 error generated.

error: command 'cc' failed with exit status 1

这里描述了同样的问题:Missing file when installing pylinkgrammar

但这些解决方案仅适用于 Ubuntu,因为 MacPorts 没有软件包 liblink-grammar4liblink-grammar4-dev

编辑:我忘了说我已经使用 MacPorts 安装了 link-grammar。尽管如此,还是会出现此错误。

最佳答案

似乎MacPorts package不包括开发 header 。

我能够针对来自 homebrewlink-grammar 包成功构建 pylinkgrammar虽然:

然后照常安装pylinkgrammar

关于python - 在 Mac 上安装 pylinkgrammar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26564072/

相关文章:

python - 为什么joblib.Parallel()比非并行计算花费更多的时间? Parallel()的运行速度是否应该比非并行计算快?

python - 如何针对一个值测试多个变量?

python - 执行时 Pandas Pivot_table 错误 -Type 错误

rust - 在 Travis CI 上交叉编译简单 crate 时找不到链接器 cc

c - 使用 scanf 存储字符串时出现问题

C 使用 dirent.h

python - Pycharm 终端在使用 VirtualEnv 的 Windows 10 上无法正常工作

c - `man cc` : no info about -Wall and -g flags (Learn C the Hard Way)

c - 如何在 Solaris/Linux 服务器上为 Oracle 创建一个 makefile?

python - ctypes.Structure 在运行时修改_fields_