pythonpython-3.xnlpgoogle-colaboratoryenchant

COLAB ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output


Could anyone please help me to fix this? I am trying to install pyenchant in colab to perform a possible suggestion if a word is spelled wrongly. I would like to use pyenchant. This is what I tried;

!pip install pyenchant==1.6.8 

but it output the following error;

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

My idea is to get some possible suggestion if a word is wrong, I plan to do the following

import enchant
test = enchant.Dict("en_US")
test.suggest("Posible")

Could anyone suggest how can I achieve this? I am working on colab. Please help me on how to install pyenchant in colab or any other possible way I can achieve possible suggestion if a word is wrong.


Solution

  • You need to install with apt first

    !apt install enchant
    

    Then with pip

    !pip install pyenchant