2015-05-15 57 views
3

我能夠安裝pyenchant,使用pip install pyenchantbrew 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 
+0

我無法在Linux上重現此功能(*無法在OS X上測試*恐怕*)。如果我冒險猜測,我說「pyenchant的安裝不能正確編譯/鏈接到附魔 –

+0

我試圖卸載,並重新安裝附魔之前pyenchant,但沒有運氣 –

+0

我從pyenchant安裝使用'pip3安裝pyenchant'在Mac上。 –

回答

0

在這個其他職位(Pyenchant utils loading error),他們建議在MacOS上使用自制軟件安裝在C庫(BREW安裝附魔),對我來說工作。