3
我能夠安裝pyenchant,使用pip install pyenchant
和brew install enchant
。然而,當我去進口附魔,我得到以下錯誤:在Python 3中導入Pyenchant時出錯
>>> import enchant
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import enchant
File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/enchant/__init__.py", line 92, in <module>
from enchant import _enchant as _e
File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/enchant/_enchant.py", line 121, in <module>
prefix_dir.contents = c_char_p(e_dir)
TypeError: bytes or integer address expected instead of str instance
我無法在Linux上重現此功能(*無法在OS X上測試*恐怕*)。如果我冒險猜測,我說「pyenchant的安裝不能正確編譯/鏈接到附魔 –
我試圖卸載,並重新安裝附魔之前pyenchant,但沒有運氣 –
我從pyenchant安裝使用'pip3安裝pyenchant'在Mac上。 –