0

I'm using Windows-7, 64 bit PC. I want to perform spelling check for a text, using python. I tried to install PyEnchant package using "pip install pyenchant" command. It gets installed. but when I try to import enchant in ipython console, it gives error as "ImportError: cannot import name utils". Is there any other method to install and use PyEnchant?

In [43]: import enchant
Traceback (most recent call last):
File "<ipython-input-43-be94a407aebb>", line 1, in <module>
import enchant
File "C:\Anaconda2\lib\site-packages\enchant\__init__.py", line 92, in <module>
from enchant import _enchant as _e

File "C:\Anaconda2\lib\site-packages\enchant\_enchant.py", line 55, in <module>
from enchant import utils

ImportError: cannot import name utils
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Karthik M
  • 1
  • 3

1 Answers1

0

It looks to me like you have not got the underlying C library Enchant installed. Pyenchant is just a python wrapper for the Enchant C library. You can either build and install the C library yourself get the code from http://www.abisource.com/projects/enchant/#download or as you ask if there is another way to install it use the pyenchant-1.6.6.win32.exe link on http://pythonhosted.org/pyenchant/download.html which will install the Enchant C library for you.

Dan-Dev
  • 8,957
  • 3
  • 38
  • 55
  • Thank you for the answer! But I think since the Anaconda version is 64bit in my PC, pyenchant-1.6.6.win32.exe is not installing. So should I use 32 bit Anaconda package? – Karthik M Apr 25 '16 at 04:50
  • I'd compile it from source if the .exe is not installing. – Dan-Dev Apr 25 '16 at 19:13