WebFaction
Community site: login faq

Hello, I've setup a virtualenv for my project and have been able to successfully install all of the libraries I need using pip except PyEnchant (spellchecker).

Whenever I try to install pyenchant I get the message:

ImportError: enchant C library not found

So I figured I need to install the enchant library from source. I downloaded enchant from http://www.abisource.com/downloads/enchant/1.6.0/enchant-1.6.0.tar.gz and followed all of the instructions at http://docs.webfaction.com/software/home-install.html and I believe I now have successfully installed enchant. It shows up in my ~/bin folder and all the other files are in ~/lib, ~/include, etc. However, now when I try to install pyenchant through pip i'm still getting the same "ImportError: enchant C library not found" message.

Anyone have any idea what I'm doing wrong?

Thanks in advance!

asked 25 Nov '13, 11:57

bbeng89
111
accept rate: 0%


So I've found a work-around. I'm using a virtualenv so I added the following environment variable to my ~/virtualenvs/myproject/bin/activate file:

export PYENCHANT_LIBRARY_PATH="/home/bbeng89/lib/libenchant.so.1.6.0"

After adding this and reactivating the virtualenv, I was able to install pyenchant without any problems.

Not sure if this was the best way but it seemed to work.

permanent link

answered 25 Nov '13, 13:00

bbeng89
111
accept rate: 0%

You can also add the export to your .bashrc, be sure to source the file and restart the application to pickup the change.

(26 Nov '13, 16:13) timg ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×337
×55
×11
×1

question asked: 25 Nov '13, 11:57

question was seen: 4,132 times

last updated: 26 Nov '13, 16:13

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM