shantanuo
shantanuo

Reputation: 32346

How do I install hunspell python package?

When I try using pip, pip install hunspell

I get an error:

error: command 'gcc' failed with exit status 1

According to this page, the author of the package does not know how to install it using conda environment:

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

I will prefer to continue with conda instead of switching back to "regular" python distribution.

Upvotes: 1

Views: 10935

Answers (2)

shantanuo
shantanuo

Reputation: 32346

Conda environment is no different. I used the same commands and it worked same as "regular" python installation.

sudo apt-get update
sudo apt-get install python-dev 
sudo apt-get install libhunspell-dev
sudo pip install hunspell

Upvotes: 5

Jean Monet
Jean Monet

Reputation: 2665

To get gcc, on Ubuntu:

sudo apt install build-essentials

I would suggest using the package CyHunspell which is regularly maintained:

pip install cyhunspell (currently not available via conda repositories)

It appears that PyHunspell (pip install hunspell or conda install hunspell) is no longer maintained, last commit 2 years ago, and very hacky to get working.

Upvotes: 1

Related Questions