undefined symbol: PyOS_mystrnicmp
<p>I tried installing <code>pysqlite</code>, but I'm having some trouble using it.</p>

<pre><code>&gt;&gt;&gt; import pysqlite2.dbapi2
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/data/.pyenv/versions/2.7.5/lib/python2.7/site-packages/pysqlite2/dbapi2.py", line 28, in &lt;module&gt;
    from pysqlite2._sqlite import *
ImportError: /data/.pyenv/versions/2.7.5/lib/python2.7/site-packages/pysqlite2/_sqlite.so: undefined symbol: PyOS_mystrnicmp
</code></pre>

<p>I think I might be missing some Python headers. Where do I find them? I'm using CentOS with CPython 2.7.5.</p>

<p>As <a href="https://groups.google.com/forum/#!topic/python-sqlite/04Ocf7aP1so" rel="nofollow">https://groups.google.com/forum/#!topic/python-sqlite/04Ocf7aP1so</a> points out, a <a href="http://bugs.python.org/issue18603" rel="nofollow">bug</a> was reported that appears to be fixed in newer versions of Python. Upgrading to a later version of Python 2.7 did the trick for me.</p>

python cpython