我能够使用pip install pyenchant和brew install enchant安装pyenchant。但是,当我导入enchant时,我得到以下错误:
>>> 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发布于 2015-12-27 07:35:43
在另一篇文章(Pyenchant utils loading error)中,他们建议用homebrew (brew install enchant)在MacOS中安装C库,对我来说是可行的。
发布于 2018-12-28 18:42:49
在python364位着魔不存在它的一个老问题不知道为什么不解决,如果它绝对需要使用python32位就可以解决它,它工作得很好。
https://stackoverflow.com/questions/30249856
复制相似问题