How to install enchant library

7,513 views
Skip to first unread message

Sonal Breed

unread,
Aug 26, 2009, 12:26:24 PM8/26/09
to pyenchant users
Hi all,

I am trying to install PyEnchant package on server machine.
First I tried easy_install mode to install the same, but I got
following
errors when I tried to import enchant package in python interactive
window:
>>> import enchant

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mygoplanner/lib/python2.5/pyenchant-1.5.3-py2.5.egg/
enchant/__init__.py", line 94, in <module>
from enchant import _enchant as _e
File "/home/mygoplanner/lib/python2.5/pyenchant-1.5.3-py2.5.egg/
enchant/_enchant.py", line 72, in <module>
raise ImportError("enchant C library not found")
ImportError: enchant C library not found

I then downloaded enchant-1.5.0.tar.gz, unzipped it and ran ./
configure file.
I also then removed PyEnchant package using easy_install -m option
and
again tried to install it by downloading pyenchant-1.5.3.tar.gz and
running
python setup.py install.

Still I get following errors when I try to
import enchant package in python interactive window:

>>> import enchant
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "enchant/__init__.py", line 94, in <module>
from enchant import _enchant as _e
File "enchant/_enchant.py", line 72, in <module>
raise ImportError("enchant C library not found")
ImportError: enchant C library not found

Any Ideas on this?
Any help will be really appreciated.


Thanks,

Sincerely,
Sonal.

Ryan Kelly

unread,
Aug 26, 2009, 11:36:47 PM8/26/09
to pyencha...@googlegroups.com

Hi Sonal,

> I am trying to install PyEnchant package on server machine.
>

> ...


>
> I then downloaded enchant-1.5.0.tar.gz, unzipped it and ran ./
> configure file.

You're on the right track here, you need a working installation of the
underlying enchant library before you can run PyEnchant.

First, what operating system are you running on your server? Many have
pre-built packages of enchant that will be much simpler to set up. For
example, on my Ubuntu machine I can do `apt-get install libenchant1c2a`.
Do you have root access on the server, or is it a shared hosting
environment?

If you are keen to install enchant from source, it should be a simple
matter of doing:

./configure
make
make install

> I also then removed PyEnchant package using easy_install -m option

You don't need to remove and re-install pyenchant, it will automatically
detect that the C library has been installed.


Ryan

--
Ryan Kelly
http://www.rfk.id.au | This message is digitally signed. Please visit
ry...@rfk.id.au | http://www.rfk.id.au/ramblings/gpg/ for details

signature.asc

Kelvin Nyota

unread,
Feb 28, 2015, 2:06:59 AM2/28/15
to pyencha...@googlegroups.com
just install all the packages again but the bes way is to install them automatically. Do your research on how to install it or use:
pip install pyenchant

Ryan Kelly

unread,
Feb 28, 2015, 5:28:15 PM2/28/15
to pyencha...@googlegroups.com
On 28/02/2015 00:22, Kelvin Nyota wrote:
> just install all the packages again but the bes way is to install them
> automatically. Do your research <http://www.researchpaperstobuy.com> on
> how to install it or use:
>
> pip install pyenchant

The above response is not helpful, and even if it were, there's no need
to be rude or dismissive about it.

> On Wednesday, 26 August 2009 12:26:24 UTC-4, Sonal Breed wrote:
> I then downloaded enchant-1.5.0.tar.gz, unzipped it and ran ./
> configure file.

You're definitely on the right track installing the lib from source.

You'll need to do a full ./configure, make, and make install to ensure
the library is installed properly on your system. It's not clear from
your comments above whether you completed all three steps.

> I also then removed PyEnchant package using easy_install -m option
> and
> again tried to install it by downloading pyenchant-1.5.3.tar.gz and
> running
> python setup.py install.

It should not be necessary to re-install the PyEnchant package, it
should pick up the enchant C lib automatically once you get it correctly
installed.


Cheers,

Ryan
Reply all
Reply to author
Forward
0 new messages