conda cythen pip pkg hunspell CyHunspell AttributeError: module 'hunspell' has no attribute 'HunSpell'

Question:

I installed

pip install hunspell 

and the following statement runs fine:

import hunspell; hobj = hunspell.HunSpell('/usr/share/hunspell/en_US.dic', '/usr/share/hunspell/en_US.aff') ; print( "PY_test: hunspell: " + str( hobj.spell('spookie') ) )

But if I install additionally

pip install CyHunspell

I get an error with execution of the
AttributeError: module ‘hunspell’ has no attribute ‘HunSpell’

Cyhunspell only contains hunspell.hunspell ..

Is Cyhunspell overwritting Pyhunspell?
But I would like to install both and choose the Cpython version (not Cyhunspell) if I would like.

Asked By: InLaw

||

Answers:

PyHunspell uses extension module named hunspell written in C++. CyHunspell uses package named hunspell. Hence these two cannot be installed at the same time. One or the other but not both.

PS. You can try to ask one of them to rename the module or the package but I doubt one’s gonna bow before the other.

Answered By: phd

I have tried a lot of times for solving this problem. I have tried to install hunspell in several processes but this problem wasn’t resolved. For resolving this problem I used cyhunspell. Just use this technique your error will be solved in seconds.
write : pip install cyhunspell
cyhunspell is a wrapper that used hunspell library.

Answered By: Avijit Chowdhury
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.