Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difficulty installing PyEnchant module on a Mac using Python 2.7

I'm having trouble getting a Python module called PyEnchant to install on my Mac. I am using Python 2.7. When I open up and run the pyenchant setup.py file I get the following error message:

Traceback (most recent call last):
File "/Applications/Python 2.7/pyenchant-1.6.5/setup.py", line 195, in <module>
    import enchant

File "/Applications/Python 2.7/pyenchant-1.6.5/enchant/__init__.py", line 90, in <module>
    from enchant import _enchant as _e

File "/Applications/Python 2.7/pyenchant-1.6.5/enchant/_enchant.py", line 133, in <module>
    raise ImportError("enchant C library not found")

ImportError: enchant C library not found

I have tried running the .dmg file that is available on the pyenchant website. The installation processes proceeds without any error messages but, once it completes, I am still unable to import pyenchant into Python, nor can I find the installed software anywhere in Finder.

I also tried to use the .egg installer, which opened up a Python window with the letters "PK" written at the top in black capitals. I don't know what this means.

As you can probably tell I am not an experienced Python user so any help on this is greatly appreciated.

like image 300
Matt Robinson Avatar asked Jun 11 '12 14:06

Matt Robinson


1 Answers

Installing enchant first worked for me

brew install enchant
like image 142
kcathode Avatar answered Oct 08 '22 03:10

kcathode