通过pip安装Python hunspell包失败

4
安装hunspell python包(通过pip)时出现以下错误:
hunspell.c:21:22: fatal error: hunspell.h: No such file or directory
 #include <hunspell.h>
                      ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

有什么办法可以解决这个问题吗?

3个回答

6

尝试:

sudo apt-get install libhunspell-dev
pip install hunspell

...如同 John D 在 pyhunspell 的 github 页面中推荐的那样(提供链接):

https://github.com/blatinier/pyhunspell/issues/22

我无法安装'hunspell-dev',但我可以安装 'libhunspell-dev'。


1

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接