通过PIP失败安装Python Hunspell包装



安装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

任何想法要解决这个问题?

尝试:

sudo apt-get install libhunspell-dev
pip install hunspell

...在Pyhunspell的GitHub页面中的同一线程中建议(约翰D提供):https://github.com/blatinier/pyhunspell/issues/22

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

尝试 sudo apt-get install hunspell-dev然后尝试再次安装Hunspell(或Pyhunspell)

在Pyhuspell的GitHub页面上的一个问题中引用了此问题:https://github.com/blatinier/pyhunspell/issues/22

这对我有用

sudo apt-get install libhunspell-dev
python3 -m pip install hunspell

或使用此

https://pypi.org/project/cyhunspell/

最新更新