Using Mac OSX 10.12.3 with Python 3. I have installed pyenchant but it only works with the preinstalled dictionaries.
import enchant
print(enchant.list_languages())
['de_DE', 'en_AU', 'en_GB', 'en_US', 'fr_FR']
I have installed Homebrew and tried to install the Swedish language dictionary from ftp://ftp.gnu.org/gnu/aspell/dict/0index.html following this answer: https://stackoverflow.com/a/35757817/4802426
brew install aspell-sv
Error: No available formula with the name "aspell-sv"
==> Searching for a previously deleted formula...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
I've also tried to install it using this answer: https://stackoverflow.com/a/11807786/4802426
But that doesn't work either. Installing with this method works fine but when listing languages as above no new languages show up. I have tried the above mentioned methods for different languages and providers, e.g. myspell-es
, aspell-es
etc.
How do I move forward from here? Others must have tackled the same problem.
Not sure whether pyenchant works fine with Python3. Did you put the downloaded dictionary file in the right site-packages folder of Python3?
Official pyenchant tutorial for osx users
Update: To find python3 site-packages folder on osx: type
python3
to get into python interactive shell, thenimport sys;sys.exec_prefix
to find your python3 path. The folder path will be appending your python3 path with/lib/pythonX.Y/site-packages
, whereX.Y
is your python3 specific version number.