Difficulty installing PyEnchant module on a Mac using Python 2.7
Asked Answered
V

3

6

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.

Vish answered 11/6, 2012 at 14:18 Comment(1)
I was able to install, but I can't get it to work on a jupyter notebook...#44171266Wanids
O
4

Installing enchant first worked for me

brew install enchant
Onrush answered 22/2, 2013 at 18:18 Comment(0)
D
0

There are many ways to install PyEnchant, for example with MacPorts:

sudo port install py27-enchant

This will additionally install enchant, aspell, and hunspell libraries. You have to install dictionaries separately, to get a list of them run

port search aspell-dict

for example, installing the German dictionary

sudo port install aspell-dict-de

And you're done!

(I hope you have found your answer elsewhere by now though)

Dejection answered 3/9, 2012 at 14:8 Comment(0)
A
0

Try this - It worked for me on Ubuntu.

 sudo apt-get install libenchant1c2a
Aurel answered 7/1, 2015 at 10:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.