Pyenchant utils加载错误
Pyenchant utils loading error
我正在尝试加载 pyenchant 进行一些文本处理,但是在使用 pip install pyenchant
之后,当我尝试导入 pyenchant 时出现以下错误。有没有人以前见过这个或知道如何解决它?
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-6-fd4a8a7f6802> in <module>()
1 import pandas as pd
----> 2 import enchant as ench
3
4 List_v1 = pd.read_csv("List_v1.txt",sep='\t')
5 List_v1 = List_v1.fillna(0)
/__init__.py in <module>()
90
91 try:
---> 92 from enchant import _enchant as _e
93 except ImportError:
94 if not os.environ.get("PYENCHANT_IGNORE_MISSING_LIB",False):
/enchant/_enchant.py in <module>()
53 from ctypes.util import find_library
54
---> 55 from enchant import utils
56 from enchant.errors import *
57 from enchant.utils import unicode
ImportError: cannot import name utils
我有同样的错误。解决我的问题的是安装 pyenchant 所基于的 C 库 enchant。 (参见 Cannot install pyenchant on OSX)
您可以通过 运行:
安装
brew install enchant
我正在尝试加载 pyenchant 进行一些文本处理,但是在使用 pip install pyenchant
之后,当我尝试导入 pyenchant 时出现以下错误。有没有人以前见过这个或知道如何解决它?
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-6-fd4a8a7f6802> in <module>()
1 import pandas as pd
----> 2 import enchant as ench
3
4 List_v1 = pd.read_csv("List_v1.txt",sep='\t')
5 List_v1 = List_v1.fillna(0)
/__init__.py in <module>()
90
91 try:
---> 92 from enchant import _enchant as _e
93 except ImportError:
94 if not os.environ.get("PYENCHANT_IGNORE_MISSING_LIB",False):
/enchant/_enchant.py in <module>()
53 from ctypes.util import find_library
54
---> 55 from enchant import utils
56 from enchant.errors import *
57 from enchant.utils import unicode
ImportError: cannot import name utils
我有同样的错误。解决我的问题的是安装 pyenchant 所基于的 C 库 enchant。 (参见 Cannot install pyenchant on OSX) 您可以通过 运行:
安装brew install enchant