Macos 添加新语言以在Mac OS上进行附魔

Macos 添加新语言以在Mac OS上进行附魔,macos,python-2.7,pyenchant,Macos,Python 2.7,Pyenchant,我试图在Mac OS上的anaconda包中为pyenchant添加一种新语言。我下载了myspell的文件(ru_ru.aff和ru_ru.dic)。 据我所知,我必须将这些文件添加到/user/anaconda/lib/python2.7/site-packages/enchant/share/myspell/ 嗯,在/user/anaconda/lib/python2.7/site-packages/enchant/中没有目录共享,所以我创建了/user/anaconda/lib/pyth

我试图在Mac OS上的anaconda包中为pyenchant添加一种新语言。我下载了myspell的文件(ru_ru.aff和ru_ru.dic)。 据我所知,我必须将这些文件添加到/user/anaconda/lib/python2.7/site-packages/enchant/share/myspell/

嗯,在/user/anaconda/lib/python2.7/site-packages/enchant/中没有目录共享,所以我创建了/user/anaconda/lib/python2.7/site-packages/enchant/share/myspell/文件夹,并添加了文件。。。所以,它不起作用


如何将新语言添加到enchant?

如果从python提示符运行(三行):b=enchant.Broker()b.descripe()b.list_dicts()>>>b.descripe()[]>>b.list_dicts()[('en',),('en_-CA',,('en_-GB',,('en_-US',)]尝试(四行):enchant.set_参数(“enchant.myspell.dictionary.path”,“/user/anaconda/lib/python2.7/site packages/enchant/share/myspell/”)b=enchant.Broker()b.descripe()b.list_dicts()如果从python提示符运行(以三行形式)结果是一样的:b=enchant.Broker()b.descripe()b.list_dicts()>>>b.descripe()[[]>>b.list_dicts()[('en',('en_-CA',),('en_-GB',),),('en_-GB',),),('en_-US',)试试看(四行):enchant.set_param(“enchant.myspell.dictionary.path”,“/user/anaconda/lib/python2.7/site packages/enchant/share/myspell/”)b=enchant.Broker()b.description()b.list_dicts()结果相同