A.J. Uppal
A.J. Uppal

Reputation: 19264

"enchant C library not found" while installing pyenchant using pip on OSX

I typed in pip install pyenchant into my shell, but it raised two Traceback errors:

1:

Traceback (most recent call last):
  File "<string>", line 16, in <module>
  File "/private/var/folders/q4/l70hdqjd5db2n2bdj69qrwz40000gq/T/pip_build_prernauppal/pyenchant/setup.py", line 195, in <module>
    import enchant
  File "enchant/__init__.py", line 90, in <module>
    from enchant import _enchant as _e
  File "enchant/_enchant.py", line 133, in <module>
    raise ImportError("enchant C library not found")
ImportError: enchant C library not found

2:

Traceback (most recent call last):

    File "<string>", line 16, in <module>

    File "/private/var/folders/q4/l70hdqjd5db2n2bdj69qrwz40000gq/T/pip_build_prernauppal/pyenchant/setup.py", line 195, in <module>

        import enchant

    File "enchant/__init__.py", line 90, in <module>

        from enchant import _enchant as _e

     File "enchant/_enchant.py", line 133, in <module>

        raise ImportError("enchant C library not found")

ImportError: enchant C library not found

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/q4/l70hdqjd5db2n2bdj69qrwz40000gq/T/pip_build_prernauppal/pyenchant

I have python 2.7 default installed on my mac, but it still isn't working. I have already looked at Unable to install pyenchant-1.6.5 for python 2.7 on Mac OSX Lion but it doesn't answer my question, as easy_install pyenchant raises even more errors.

Upvotes: 11

Views: 15788

Answers (8)

Ruth
Ruth

Reputation: 1

For windows: download the required .exe file based on version from https://pypi.python.org/simple/pyenchant/ and pip install pyenchant

Upvotes: 0

Kelvin N.
Kelvin N.

Reputation: 7

You have to download the NLTK package. That is how you get Pyenchant running. But if your building a grammar checker, pyenchant is not advisable because it only grammar checks two words. You should consider building a grammar checker on your own by starting with an autocomplete word completion from here: How to code autocompletion in python?

Upvotes: 0

Kelvin N.
Kelvin N.

Reputation: 7

[nltk_data] Error loading enchant: Package 'enchant' not found in

No. if you get this problem, you are supposed to install it like this:

$ sudo easy_install pyenchant

it is not an nltk package, it is a package on its own.

Upvotes: 1

Dhiraj
Dhiraj

Reputation: 481

Try this - It worked for me on Ubuntu.

sudo apt-get install libenchant1c2a

Upvotes: 10

user3547346
user3547346

Reputation:

Try either sudo pip install or sudo easy install.

Upvotes: 1

user3373385
user3373385

Reputation:

Try a pip install, an easy_install, and a brew.

Upvotes: 0

user3268208
user3268208

Reputation:

sudo easy_install

sudo because MAC permissions are usually messed up

Upvotes: 0

Slater Victoroff
Slater Victoroff

Reputation: 21914

You need to install enchant, which is a C library. You can use Homebrew, to do this kind of package management. Just enter:

brew install enchant

Before trying to pip install pyenchant and you should be fine.

Upvotes: 8

Related Questions