title: centos pyodbc stopped working. Error: pyodbc.so: undefined symbol: PyUnicodeUCS2_From_Object
body: <p>As I needed to add some libraries to Python2.7 on CentOS, I decided to rebuild Python. However, since I've done this, pyodbc doesnt work anymore and shows the following error when trying to import pyodbc</p>
  
  <pre><code> &gt;&gt;&gt; import pyodbc
  /usr/local/lib/python2.7/site-packages/pyodbc-3.0.7-py2.7-linux-x86_64.egg/pyodbc.py:3: UserWarning: Module pyodbc was already imported from /usr/local/lib/python2.7/site-packages/pyodbc-3.0.7-py2.7-linux-x86_64.egg/pyodbc.pyc, but /mnt/fastArray0/user/Roel/Development/django/pyodbc-3.0.7 is being added to sys.path
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "build/bdist.linux-x86_64/egg/pyodbc.py", line 7, in &lt;module&gt;
    File "build/bdist.linux-x86_64/egg/pyodbc.py", line 6, in __bootstrap__
  ImportError: /root/.python-eggs/pyodbc-3.0.7-py2.7-linux-x86_64.egg-tmp/pyodbc.so: undefined symbol: PyUnicodeUCS2_FromObject
  </code></pre>
  
  <p>I reinstalled pyodbc, reinstalled all dependencies but the issue persists. Also, I checked the new libraries I added to Python but i really doubt that packages like pytz won't affect pyodbc at all. </p>
  
  <p>Furthermore, all other libraries are still working fine. It is just pyodbc which really doesn't like to work anymore.</p>