我是Python的新手,需要在Windows 10上安装hunspell。 工具是PyCharm。
首先,我尝试安装CyHunspell:pip install CyHunspell
,但是得到了以下错误消息:
RuntimeError: 'pkg-config' is not recognized as an internal or external command,operable program or batch file.
然后我尝试安装PyHunspell,但出现了以下错误消息:
ERROR: Could not find a version that satisfies the requirement PyHunspell (from versions: none)
ERROR: No matching distribution found for PyHunspell
然后我尝试直接安装hunspell,但出现了以下错误信息:
hunspell.cpp
hunspell.cpp(20): fatal error C1083: Cannot open include file: 'hunspell.hxx': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
在我的测试代码中:
import hunspell
结果:
spellchecker = hunspell.HunSpell() failed with the following error msg:
AttributeError: module 'hunspell' has no attribute 'HunSpell'
我想我不是第一个在Windows 10上使用hunspell的人,但是我似乎找不到需要使其工作的信息。
readme.md
文件中描述的在Windows上构建它的步骤进行操作。 - martineau