Problems with 'pyenchant', CentOS (& El Capitan)
<h1>Problem Statement</h1>

<p>I am having problems running a python file that import's the enchant library. I've installed the enchant module with the following command:</p>

<pre><code>$ pip install -U pyenchant
&gt; Requirement already up-to-date: pyenchant in /usr/lib/python3.4/site-packages
</code></pre>

<p><br></p>

<h1>My Python Environment</h1>

<pre><code>$ cat /etc/*-release
CentOS Linux release 7.2.1511 (Core)

$ cat ~/.zshrc
...
export PYTHONPATH=/usr/lib/python3.4/site-packages
alias py="python3"
alias pip="pip3"
...

$ py --version
Python 3.4.3

$ pip --version
pip 8.1.1 from /usr/lib/python3.4/site-packages (python 3.4)

$ echo $PYTHONPATH
/usr/lib/python3.4/site-packages

$ ls -al /usr/lib/python3.4/site-packages | grep enchant
drwxr-xr-x  5 root root 4096 13 apr 13:56 enchant
drwxr-xr-x  2 root root 4096 13 apr 13:56 pyenchant-1.6.6.dist-info

$ yum list installed | grep python-enchant
((nothing))
</code></pre>

<p><br></p>

<h1>My Python File</h1>

<pre><code>$ cat ~/diskchall.py
import enchant

dictionary = enchant.Dict("en_US")
...
</code></pre>

<p><br></p>

<h1>Running the file</h1>

<pre><code>$ py ~/diskchall.py
Traceback (most recent call last):
  File "/root/diskchall.py", line 1, in &lt;module&gt;
    import enchant
  File "/usr/lib/python3.4/site-packages/enchant/__init__.py", line 92, in &lt;module&gt;
    from enchant import _enchant as _e
  File "/usr/lib/python3.4/site-packages/enchant/_enchant.py", line 143, in &lt;module&gt;
    raise ImportError(msg)
ImportError: The 'enchant' C library was not found. Please install it via your OS package manager, or use a pre-built binary wheel from PyPI.
</code></pre>

<p><br></p>

<h1><del>OS X El Capitan - TypeError</del></h1>

<p>Did pretty much the same steps on El Capitan, but when running it gave me a TypeError. </p>

<p>Fixed by changing the <code>_enchant.py</code> file as suggested by <a href="https://github.com/rfk/pyenchant/issues/45" rel="nofollow">this issue</a>. </p>

<p>Pretty much a shame that this commit was from <strong>2014</strong> and still hasn't made the Pip repo.</p>