32 bit Python not working with sqlite3

I have a very strange problem, my 64 bit python works fine with sqlite3, no errors when importing sqlite3. However my 32bit python won't work, here is the error message. I have installed python using homebrew and I am using the latest OS X Lion and Xcode. Any help would be appreciated.

Edit: on my other computer, also a mac, sqlite3 works with both 32bit and 64bit python.

Python 2.7.2 (default, Mar 19 2012, 20:52:31) 
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.54)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
    from dbapi2 import *
  File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: dlopen(/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_sqlite3.so, 2): Symbol not found: _sqlite3_aggregate_context
  Referenced from: /usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_sqlite3.so
  Expected in: dynamic lookup



source to share

All Articles