Mass17
Mass17

Reputation: 1605

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.

Upvotes: 0

Views: 5611

Answers (2)

korakot
korakot

Reputation: 40908

You need to install with apt first

!apt install enchant

Then with pip

!pip install pyenchant

Upvotes: 2

Junaid Suhail Niaz
Junaid Suhail Niaz

Reputation: 71

Another possibility based on NLTK without enchant is NLTK's words corpus

>>> from nltk.corpus import words
>>> "would" in words.words()
True
>>> "could" in words.words()
True
>>> "should" in words.words()
True
>>> "I" in words.words()
True
>>> "you" in words.words()
True

Or if you still want to use enchant https://stackoverflow.com/a/57444274/11339475 Have look at this solution, It has already been addressed.

Upvotes: 1

Related Questions