如何在MacOS上安装Spacy-hunspell

时间:2019-04-04 02:35:22

标签: python pip spacy hunspell

当我运行pip3 install hunspell==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

我尝试使用不同的编译器标记和GCC版本从其源存储库中分别构建hunspellpyhunspellspacy-hunspell,但是问题仍然存在。

有什么想法要从这里前进吗?

0 个答案:

没有答案