I am running Python 3.6 in Spyder/Anaconda, I am trying to use enchant. I installed pyenchant using

pip install pyenchant

I also installed aspell using

sudo apt-get install aspell-en

I am executing in Python:

import enchant

print("The dict is", enchant.list_languages())

slownik = enchant.Dict("en_US")

I keep getting an error:

line 562, in init

line 168, in init

line 569, in _init_this
this = self._broker._request_dict_data(self.tag)

line 310, in _request_dict_data
self._raise_error(eStr % (tag,),DictNotFoundError)

line 258, in _raise_error
raise eclass(default)

DictNotFoundError: Dictionary for language ‘en_US’ could not be found

And the printout is:

The dict is []

so no dictionaries are being loaded. It seems that enchant does not know where the aspell dictionaries are located.

I tried numerous variations of

enchant.set_param("enchant.aspell.dictionary.path","/aspell") enchant.set_param("enchant.myspell.dictionary.path","/usr/bin/aspell")

What may be relevant: this simple code worked before I upgraded to Ubuntu 17.10 (from 17.4), so I somehow got enchant to work then, but it was long ago and I cannot recreate what I did differently when installing enchant back then. I have also updated Spyder to the latest version, one of those operations clearly caused the code to break. I was updating Spyder in the past and it did not cause any problems, so I am suspecting that during the system update something important got deleted/moved.
I found answers for people with similar issues on MacOS, but the answers I found do not work on Ubuntu.
Any help would be greatly appreciated.