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.
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.
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.
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.
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.
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.