Fix error with PyEnchant on Replit.com

Question:
How can I fix this error with PyEnchant on my repl?
Repl link:
https://replit.com/@MiloCat/PyEnchant?v=1

import enchant

d = enchant.Dict("en_US")
d.check("Hello")

error:
Traceback (most recent call last):
File “main.py”, line 1, in
import enchant
File “/home/runner/PyEnchant/venv/lib/python3.8/site-packages/enchant/init.py”, line 81, in
from enchant import _enchant as _e
File “/home/runner/PyEnchant/venv/lib/python3.8/site-packages/enchant/_enchant.py”, line 157, in
raise ImportError(msg)
ImportError: The ‘enchant’ C library was not found and maybe needs to be installed.
See Installation — PyEnchant 3.2.2 documentation
for details

use this template as replit auto-installs the incorrect package, and this template has the correct one installed.

1 Like

thanks! :slight_smile: it works i think
but profanity_check doesn’t work :frowning:

oh ok, can you try pip install alt-profanity-check

gtg for now, will tell if works
edit: It works!!! Tysm!
edit2:
this error happens @bigminiboss:
Traceback (most recent call last):
File “main.py”, line 8, in
import profanity_check
File “/home/runner/Python-PyEnchant/venv/lib/python3.8/site-packages/profanity_check/init.py”, line 1, in
from .profanity_check import predict, predict_prob
File “/home/runner/Python-PyEnchant/venv/lib/python3.8/site-packages/profanity_check/profanity_check.py”, line 3, in
from sklearn.externals import joblib
ImportError: cannot import name ‘joblib’ from ‘sklearn.externals’ (/home/runner/Python-PyEnchant/venv/lib/python3.8/site-packages/sklearn/externals/init.py)

did you try very specifically, this, and only this, pip install alt-profanity-check?

Yes I have tried that

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.