Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python hunspell package installation via pip fails

The installation of the hunspell python package (via pip) fails with the following error:

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

Any idea what to do to solve this?

like image 476
Phil B Avatar asked Nov 05 '25 05:11

Phil B


2 Answers

Try:

sudo apt-get install libhunspell-dev
pip install hunspell

...as recommended in the same thread in pyhunspell's github page (provided by John D): https://github.com/blatinier/pyhunspell/issues/22

I couldn't install 'hunspell-dev', but I could install libhunspell-dev.

like image 181
EuripidesL Avatar answered Nov 06 '25 19:11

EuripidesL


Try sudo apt-get install hunspell-dev and then try installing hunspell (or pyhunspell) again

This problem is referenced in an issue on pyhuspell's github page: https://github.com/blatinier/pyhunspell/issues/22

like image 41
Phil B Avatar answered Nov 06 '25 20:11

Phil B



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!