Python 如何在MacOS上安装spacy hunspell

Python 如何在MacOS上安装spacy hunspell,python,pip,spacy,hunspell,Python,Pip,Spacy,Hunspell,当我运行pip3 install==0.5.0时,它似乎安装得很顺利 Collecting hunspell==0.5.0 Installing collected packages: hunspell Successfully installed hunspell-0.5.0 现在,一旦我运行了pip3 install spacy hunspell,它似乎也会安装 Installing collected packages: spacy-hunspell Successfully insta

当我运行
pip3 install==0.5.0
时,它似乎安装得很顺利

Collecting hunspell==0.5.0
Installing collected packages: hunspell
Successfully installed hunspell-0.5.0
现在,一旦我运行了
pip3 install spacy hunspell
,它似乎也会安装

Installing collected packages: spacy-hunspell
Successfully installed spacy-hunspell-0.1.0
但是,一旦打开项目并导入包,我会得到:

Traceback (most recent call last):
  File "genVocab.py", line 5, in <module>
    from spacy_hunspell import spaCyHunSpell
  File "/usr/local/lib/python3.7/site-packages/spacy_hunspell/__init__.py", line 5, in <module>
    from hunspell import HunSpell
ImportError: dlopen(/usr/local/lib/python3.7/site-packages/hunspell.cpython-37m-darwin.so, 2): Symbol not found: __ZN8Hunspell14add_with_affixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_
  Referenced from: /usr/local/lib/python3.7/site-packages/hunspell.cpython-37m-darwin.so
  Expected in: flat namespace
 in /usr/local/lib/python3.7/site-packages/hunspell.cpython-37m-darwin.so
回溯(最近一次呼叫最后一次):
文件“genVocab.py”,第5行,在
从spacy\U HUNSPLE导入SPACYHUNSPLE
文件“/usr/local/lib/python3.7/site packages/spacy\u hunspill/\uuuuuuu init\uuuuuu.py”,第5行,在
从hunspell导入hunspell
ImportError:dlopen(/usr/local/lib/python3.7/site-packages/hunspell.cpython-37m-darwin.so,2):未找到符号:uzn8unspell14添加_u,带有_u词缀knst7_uucx1112基本_ustringicst11char_
引用自:/usr/local/lib/python3.7/site-packages/hunspell.cpython-37m-darwin.so
应为:平面命名空间
在/usr/local/lib/python3.7/site-packages/hunspell.cpython-37m-darwin.so中
我已经尝试使用不同的编译器标志和GCC版本从它们的源repo构建
hunspell
pyhunspell
spacy hunspell
,但问题仍然存在


知道如何从这里继续吗?

您是否按照运行了
brew install Hunspill
?请看哪一个指向python3.6,这可能是python3.7的问题well@C.Nivs
brew安装程序也似乎运行正常,报告:
Summary我将使用
aspell
——足够接近了。您是否按照运行了
brew安装Hunspill
?请参阅指向python3.6的内容,这可能是python3.7的一个问题well@C.Nivs
brew安装程序也似乎运行正常,报告:
Summary我将使用
aspell
——足够接近了。