Install pyenchant on a Windows 64-bit machine

心已入冬 提交于 2019-12-04 11:18:10

问题


I want to install PyEnchant for spell checking and it requires enchant installed on my machine. But all the .exe files I could find were for win32 systems. Is there any other way to install it on Windows 64-bit machine?


回答1:


Currently there is no 64-bit version of Enchant.

PyEnchant can do your spelling check under Python 32 bit - if you have to use 64 bit Python then you will need to build Enchant and PyEnchant for 64 bit and resolve any issues yourself. This isn't trivial unfortunately.

Note that 32 bit Python works fine, for most usages, on 64 bit machines and in general more libraries are supported.

For installing on Python 2.7 (32 bit) all you should need to do is:

pip install -U pyenchant

If you are having problems after this the next step is to uninstall and reinstall:

pip uninstall pyenchant pip install -U pyenchant

Hope this helps!




回答2:


According to information here https://github.com/rfk/pyenchant enchant and pyenchant are no longer maintained. Sad.

People recommend another project instead: https://github.com/barrust/pyspellchecker




回答3:


If you are going to use PyEnchant for spell checking and suggestion, take a look at Pattern library, they support Python 3 on Windows 64-bit machine now. https://github.com/clips/pattern/tree/development

In case you are interested in usage:

from pattern.en import suggest
suggest("fianlly")
#output: [('finally', 1.0)]



回答4:


Going to leave this here for anyone who comes across it. There is a prebuilt 64-bit version of libenchant which is included in GIMP. By installing it and adding the libraries into your path, you can build pyenchant on a 64-bit version of Python.

First install GIMP: https://www.gimp.org/downloads/

From the CMD prompt either globally or within your Venv add the GIMP library location to your PATH

SET PATH=%PATH%;C:\Program Files\GIMP 2\bin

Then install pyenchant

pip install pyenchant

Hope this helps.



来源:https://stackoverflow.com/questions/37771227/install-pyenchant-on-a-windows-64-bit-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!