1

Currently trying out enchant for a program involving paring acronyms, but I can't seem to get enchant to load at all.

import enchant
d = enchant.Dict("en_US")
d.check("Hello")

And the error I am getting:

Traceback (most recent call last):
File "C:\Users\TEK\Desktop\enchant.py", line 1, in <module>
import enchant
File "C:\Users\TEK\Desktop\enchant.py", line 3, in <module>
d = enchant.Dict("en_US")
tributeError: 'module' object has no attribute 'Dict'

I'm using Windows 8, Python 2.7 and I installed Enchant with the exe from here http://pythonhosted.org/pyenchant/download.html

I am wondering where or what my issue is. I'm assuming its a package issue somewhere, but working with python on Windows seems to be a pain to me unless I'm missing something obvious

ladyoftime315
  • 113
  • 10

1 Answers1

0

Had the same error, because I was naming the file "enchant.py". And then I did

import enchant

I think then he tried to import the file I was editing, so I simply changed the name and enchant was working properly.

Malte
  • 1,937
  • 1
  • 15
  • 20