rrthomas/enchant

Error trying to import enchant on Google Colab

RMNT opened this issue · 1 comments

RMNT commented

I ran '!pip install pyenchant', it worked, and when importing got this error:

ImportError                               Traceback (most recent call last)

[<ipython-input-3-c6a4b7ed6a34>](https://localhost:8080/#) in <cell line: 1>()
----> 1 import enchant

[/usr/local/lib/python3.10/dist-packages/enchant/__init__.py](https://localhost:8080/#) in <module>
     79 
     80 try:
---> 81     from enchant import _enchant as _e
     82 except ImportError:
     83     if not os.environ.get("PYENCHANT_IGNORE_MISSING_LIB", False):

[/usr/local/lib/python3.10/dist-packages/enchant/_enchant.py](https://localhost:8080/#) in <module>
    155         """
    156     )
--> 157     raise ImportError(msg)
    158 
    159 

ImportError: The 'enchant' C library was not found and maybe needs to be installed.
See  https://pyenchant.github.io/pyenchant/install.html
for details

How do I fix it?

You probably need to install the C library 'enchant', as it says. I'm sorry, I can't give support for PyEnchant usage, this is the repo of Enchant (which you probably want to get from your package manager, not from here).